mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- The garbage collector now has an opportunity to step each time individual
thinkers tick, not just once every game tick. This more closely follows the original Lua behavior. This change was made because, in cases of extremely large and frequent memory allocations, the collector may not run fast enough if it only has a chance to execute once per tick. SVN r1197 (trunk)
This commit is contained in:
parent
ab3363dc1e
commit
b77836d4cf
3 changed files with 13 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
September 5, 2008
|
||||
- The garbage collector now has an opportunity to step each time individual
|
||||
thinkers tick, not just once every game tick. This more closely follows
|
||||
the original Lua behavior. This change was made because, in cases of
|
||||
extremely large and frequent memory allocations, the collector may not run
|
||||
fast enough if it only has a chance to execute once per tick.
|
||||
|
||||
September 4, 2008
|
||||
- Fixed: The "same level" dmflag did not work.
|
||||
- Changed the nextlevel global var to an FString.
|
||||
|
|
|
@ -126,6 +126,8 @@ IMPLEMENT_CLASS(DSectorMarker)
|
|||
|
||||
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
|
||||
|
||||
extern DThinker *NextToThink;
|
||||
|
||||
// PUBLIC DATA DEFINITIONS -------------------------------------------------
|
||||
|
||||
namespace GC
|
||||
|
@ -327,6 +329,8 @@ static void MarkRoot()
|
|||
Mark(bglobal.firstthing);
|
||||
Mark(bglobal.body1);
|
||||
Mark(bglobal.body2);
|
||||
// NextToThink must not be freed while thinkers are ticking.
|
||||
Mark(NextToThink);
|
||||
// Mark soft roots.
|
||||
if (SoftRoots != NULL)
|
||||
{
|
||||
|
|
|
@ -46,7 +46,7 @@ extern int BotWTG;
|
|||
|
||||
IMPLEMENT_CLASS (DThinker)
|
||||
|
||||
static DThinker *NextToThink;
|
||||
DThinker *NextToThink;
|
||||
|
||||
FThinkerList DThinker::Thinkers[MAX_STATNUM+2];
|
||||
FThinkerList DThinker::FreshThinkers[MAX_STATNUM+1];
|
||||
|
@ -463,6 +463,7 @@ int DThinker::TickThinkers (FThinkerList *list, FThinkerList *dest)
|
|||
if (!(node->ObjectFlags & OF_EuthanizeMe))
|
||||
{ // Only tick thinkers not scheduled for destruction
|
||||
node->Tick ();
|
||||
GC::CheckGC();
|
||||
}
|
||||
node = NextToThink;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue