fix initAllocator not being called when defined(nogc) and not defined(useMalloc)

else bottom is not properly initialized - running with sysAssert catches
this issue nicely
This commit is contained in:
Jacek Sieka
2016-03-30 20:56:44 +08:00
parent 3b732259c0
commit 2b74bbba0e

View File

@@ -2564,10 +2564,14 @@ else:
when not defined(JS): #and not defined(nimscript):
{.push stack_trace: off, profiler:off.}
when not (
defined(boehmgc) or
defined(gogc) or
(defined(nogc) and defined(useMalloc))):
proc initAllocator() {.inline.}
when not defined(nimscript) and not defined(nogc):
proc initGC()
when not defined(boehmgc) and not defined(useMalloc) and not defined(gogc):
proc initAllocator() {.inline.}
proc initStackBottom() {.inline, compilerproc.} =
# WARNING: This is very fragile! An array size of 8 does not work on my