mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 18:02:05 +00:00
@@ -497,8 +497,9 @@ proc collectCTBody(gch: var GcHeap) =
|
||||
sysAssert(allocInv(gch.region), "collectCT: end")
|
||||
|
||||
proc collectCT(gch: var GcHeap; size: int) =
|
||||
let fmem = getFreeMem(gch.region)
|
||||
if (getOccupiedMem(gch.region) >= gch.cycleThreshold or
|
||||
size > getFreeMem(gch.region)) and gch.recGcLock == 0:
|
||||
size > fmem and fmem > InitialThreshold) and gch.recGcLock == 0:
|
||||
collectCTBody(gch)
|
||||
|
||||
when not defined(useNimRtl):
|
||||
|
||||
Reference in New Issue
Block a user