diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-12-27 17:54:09 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-12-27 17:54:09 +0100 |
commit | 847210b799d9cce999acaf30d4d1089fdc203d09 (patch) | |
tree | 610c657a63115d6c6b1e98185062addbf903cb09 /lib/system | |
parent | 39b25cf4dc84cd39b1d886d02e9abdd57b9646fb (diff) | |
download | Nim-847210b799d9cce999acaf30d4d1089fdc203d09.tar.gz |
disable new alloctor behaviour for emscripten
Diffstat (limited to 'lib/system')
-rw-r--r-- | lib/system/alloc.nim | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/system/alloc.nim b/lib/system/alloc.nim index 5b0955132..3b886b2fc 100644 --- a/lib/system/alloc.nim +++ b/lib/system/alloc.nim @@ -276,10 +276,11 @@ proc pageAddr(p: pointer): PChunk {.inline.} = #sysAssert(Contains(allocator.chunkStarts, pageIndex(result))) proc requestOsChunks(a: var MemRegion, size: int): PBigChunk = - if not a.blockChunkSizeIncrease: - a.nextChunkSize = - if a.currMem < 64 * 1024: PageSize*4 - else: a.nextChunkSize*2 + when not defined(emscripten): + if not a.blockChunkSizeIncrease: + a.nextChunkSize = + if a.currMem < 64 * 1024: PageSize*4 + else: a.nextChunkSize*2 var size = size if size > a.nextChunkSize: |