fixes #10271 [backport]
This commit is contained in:
parent
7f0559b93f
commit
451377f737
1 changed files with 2 additions and 1 deletions
|
|
@ -485,8 +485,9 @@ proc collectCTBody(gch: var GcHeap) =
|
||||||
sysAssert(allocInv(gch.region), "collectCT: end")
|
sysAssert(allocInv(gch.region), "collectCT: end")
|
||||||
|
|
||||||
proc collectCT(gch: var GcHeap; size: int) =
|
proc collectCT(gch: var GcHeap; size: int) =
|
||||||
|
let fmem = getFreeMem(gch.region)
|
||||||
if (getOccupiedMem(gch.region) >= gch.cycleThreshold or
|
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)
|
collectCTBody(gch)
|
||||||
|
|
||||||
when not defined(useNimRtl):
|
when not defined(useNimRtl):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue