Repository navigation
[mimalloc] Define MI_FREE_USE_PAGEMAP - #27982
Conversation
Upstream commit microsoft/mimalloc@0d17826 renamed `MI_OPT_FREE` to `MI_FREE_USE_PAGEMAP`, with its meaning reversed. As we did not previously define `MI_OPT_FREE`, define `MI_FREE_USE_PAGEMAP` instead. This also matches the upstream configuration for WASI targets. Fixes: emscripten-core#27978
See: https://github.com/microsoft/mimalloc/blob/v3.5.4/CMakeLists.txt#L545-L548. |
MI_FREE_USE_PAGEMAPMI_FREE_USE_PAGEMAP
|
Nice - glad it turned out to be fixable via a config change. |
|
Can you add a a little detail in the PR description as to what the crash in #27978 and how this fixes it? |
|
Also, can you add |
|
I think this landed as-is due to auto-merge. The commit message is slightly wrong, as I incorrectly assumed that
I'm not exactly sure why this fixes #27978 (or why increasing emscripten/system/lib/mimalloc/include/mimalloc/bits.h Lines 139 to 146 in 61b8d61 and: emscripten/system/lib/mimalloc/include/mimalloc/internal.h Lines 673 to 675 in 61b8d61 versus: emscripten/system/lib/mimalloc/include/mimalloc/internal.h Lines 711 to 717 in 61b8d61 (before commit 9eca018, MI_PAGE_MAP_FLAT was also implicitly set to 1)
Feel free to revert and investigate further, though debugging allocator issues can be very tricky. |
|
I think just folloing up with adding |
Upstream commit microsoft/mimalloc@0d17826 renamed
MI_OPT_FREEtoMI_FREE_USE_PAGEMAP, with its meaning reversed.As we did not previously define
MI_OPT_FREE, defineMI_FREE_USE_PAGEMAPinstead. This also matches the upstream configuration for WASI targets.Fixes: #27978