Skip to content

Commit fb5b18f

Browse files
committed
[mimalloc] halve the page size
1 parent ac676d5 commit fb5b18f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/system_libs.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,6 +1799,10 @@ class libmimalloc(MTLibrary):
17991799
# build emmalloc as only a system allocator, without exporting itself onto
18001800
# malloc/free in the global scope
18011801
'-DEMMALLOC_NO_STD_EXPORTS',
1802+
# halve the page size to 32KiB on wasm64 and to 16KiB on wasm32
1803+
# https://github.com/microsoft/mimalloc/issues/647#issuecomment-1324109021
1804+
# https://github.com/emscripten-core/emscripten/issues/20645#issuecomment-1962964755
1805+
'-DMI_SEGMENT_SLICE_SHIFT=(12 + MI_INTPTR_SHIFT)',
18021806
# build mimalloc with an override of malloc/free
18031807
'-DMI_MALLOC_OVERRIDE',
18041808
# TODO: add build modes that include debug checks 1,2,3

0 commit comments

Comments
 (0)