Mon Nov 02, 2020 7:14 am
Mon Nov 02, 2020 8:05 am
Wed Nov 18, 2020 6:53 am
CheckGC
once per thinker per tick, and while the game is paused, thinkers aren't ticked, so the GC is never called apart from a few scattered calls to CheckGC
(which are the cause of this bug not happening if stepmul
is set to a very high amount). A simple solution here is just to call GC::FullGC
before the early return in line 112 of p_tick.cpp. I'm not sure if there's a better solution but in my testing this doesn't result in any major performance problems (especially since the game gets locked to 35 FPS when the game is paused anyway).
Tue Nov 24, 2020 7:32 pm
Sat Dec 12, 2020 5:12 am
diff --git a/src/p_tick.cpp b/src/p_tick.cpp
index 7253eafbe..8b74e41ec 100644
--- a/src/p_tick.cpp
+++ b/src/p_tick.cpp
@@ -107,6 +107,8 @@ void P_Ticker (void)
ac->flags8 &= ~MF8_RECREATELIGHTS;
ac->SetDynamicLights();
}
+ if (!(ac->ObjectFlags & OF_EuthanizeMe))
+ GC::CheckGC();
}
}
return;
Sun Dec 13, 2020 4:39 am
Sun Dec 13, 2020 5:29 am
Sun Dec 13, 2020 5:43 am
Sun Dec 13, 2020 1:50 pm
Player701 wrote: memory usage does seem to go higher and higher if I just fire up a level and do nothing
Graf Zahl wrote: repeated calls to CheckGC only are effective if there have been additional allocations in the mean time
Sun Dec 13, 2020 4:14 pm
Mon Dec 14, 2020 4:33 am
Fri Dec 18, 2020 4:02 pm
new(...)
so they aren't subject to this. I've entirely fixed this issue locally for the next version of ZForms by converting the AABB class to a struct. It's a bit less nice to use because structs are a bit limited in ZScript but it works well enough, and causes no memory issues. Not a fix to the root cause but this seems like it'll fundamentally be a hard issue to fix so I feel like pointing it out.
Wed May 19, 2021 12:15 pm
Wed May 19, 2021 12:33 pm
Wed May 19, 2021 12:50 pm