Skip to content

Commit

Permalink
fixes #10271 [backport]
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq committed Jan 13, 2019
1 parent 7f0559b commit 451377f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/system/gc_ms.nim
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,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):
Expand Down

0 comments on commit 451377f

Please sign in to comment.