summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-10-05 17:38:37 +0200
committerGitHub <noreply@github.com>2016-10-05 17:38:37 +0200
commit989f7949275808b102da54f3f4e399dbf8d83cfc (patch)
treec1fa5b3f13310c2d66e27cae82a89cab3f0ecc14 /lib
parent79ddf0611df88a301d174bc8027237c9383528d6 (diff)
parent014a90abadcc32f21bf85418b6cc958139fb4706 (diff)
downloadNim-989f7949275808b102da54f3f4e399dbf8d83cfc.tar.gz
Merge pull request #4855 from ftsf/fix-foreignthreads
call initAllocator in foreign thread
Diffstat (limited to 'lib')
-rw-r--r--lib/system/gc_common.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/system/gc_common.nim b/lib/system/gc_common.nim
index 7a1b88c84..513ede173 100644
--- a/lib/system/gc_common.nim
+++ b/lib/system/gc_common.nim
@@ -120,6 +120,7 @@ when allowForeignThreadGc:
     ## switches are used
     if not localGcInitialized:
       localGcInitialized = true
+      initAllocator()
       var stackTop {.volatile.}: pointer
       setStackBottom(addr(stackTop))
       initGC()