summary refs log tree commit diff stats
path: root/lib/system/gc.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system/gc.nim')
-rwxr-xr-xlib/system/gc.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/system/gc.nim b/lib/system/gc.nim
index d2a6b4b94..033a7bdbe 100755
--- a/lib/system/gc.nim
+++ b/lib/system/gc.nim
@@ -63,7 +63,7 @@ type
 var
   stackBottom {.rtlThreadVar.}: pointer
   gch {.rtlThreadVar.}: TGcHeap
-  cycleThreshold {.rtlThreadVar.}: int = InitialCycleThreshold
+  cycleThreshold {.rtlThreadVar.}: int
 
 proc acquire(gch: var TGcHeap) {.inline.} = 
   when hasThreadSupport and hasSharedHeap:
@@ -267,6 +267,7 @@ proc initGC() =
   when not defined(useNimRtl):
     when traceGC:
       for i in low(TCellState)..high(TCellState): Init(states[i])
+    cycleThreshold = InitialCycleThreshold
     gch.stat.stackScans = 0
     gch.stat.cycleCollections = 0
     gch.stat.maxThreshold = 0