disable new alloctor behaviour for emscripten
This commit is contained in:
parent
39b25cf4dc
commit
847210b799
1 changed files with 5 additions and 4 deletions
|
|
@ -276,10 +276,11 @@ proc pageAddr(p: pointer): PChunk {.inline.} =
|
||||||
#sysAssert(Contains(allocator.chunkStarts, pageIndex(result)))
|
#sysAssert(Contains(allocator.chunkStarts, pageIndex(result)))
|
||||||
|
|
||||||
proc requestOsChunks(a: var MemRegion, size: int): PBigChunk =
|
proc requestOsChunks(a: var MemRegion, size: int): PBigChunk =
|
||||||
if not a.blockChunkSizeIncrease:
|
when not defined(emscripten):
|
||||||
a.nextChunkSize =
|
if not a.blockChunkSizeIncrease:
|
||||||
if a.currMem < 64 * 1024: PageSize*4
|
a.nextChunkSize =
|
||||||
else: a.nextChunkSize*2
|
if a.currMem < 64 * 1024: PageSize*4
|
||||||
|
else: a.nextChunkSize*2
|
||||||
var size = size
|
var size = size
|
||||||
|
|
||||||
if size > a.nextChunkSize:
|
if size > a.nextChunkSize:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue