call initAllocator in foreign thread

This commit is contained in:
Jez Kabanov 2016-10-05 19:16:31 +11:00
commit 014a90abad

View file

@ -120,6 +120,7 @@ when allowForeignThreadGc:
## switches are used ## switches are used
if not localGcInitialized: if not localGcInitialized:
localGcInitialized = true localGcInitialized = true
initAllocator()
var stackTop {.volatile.}: pointer var stackTop {.volatile.}: pointer
setStackBottom(addr(stackTop)) setStackBottom(addr(stackTop))
initGC() initGC()