Revert "- be a bit more aggressive with the GC when not running the game loop."
This reverts commit b4d03501af.
This commit is contained in:
parent
31549997b4
commit
e529f2d4d1
4 changed files with 1 additions and 22 deletions
|
|
@ -43,9 +43,6 @@ namespace GC
|
|||
// Number of bytes currently allocated through M_Malloc/M_Realloc.
|
||||
extern size_t AllocBytes;
|
||||
|
||||
// Number of allocated objects since last CheckGC call.
|
||||
extern size_t AllocCount;
|
||||
|
||||
// Amount of memory to allocate before triggering a collection.
|
||||
extern size_t Threshold;
|
||||
|
||||
|
|
@ -111,16 +108,11 @@ namespace GC
|
|||
}
|
||||
|
||||
// Check if it's time to collect, and do a collection step if it is.
|
||||
static inline bool CheckGC()
|
||||
static inline void CheckGC()
|
||||
{
|
||||
AllocCount = 0;
|
||||
CheckTime++;
|
||||
if (AllocBytes >= Threshold)
|
||||
{
|
||||
Step();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Forces a collection to start now.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue