Skip to content

Update mimalloc to 3.5.1 - #27662

Merged
sbc100 merged 5 commits into
emscripten-core:mainfrom
kleisauke:mimalloc-update-3.5.1
Sep 4, 2026
Merged

Update mimalloc to 3.5.1#27662
sbc100 merged 5 commits into
emscripten-core:mainfrom
kleisauke:mimalloc-update-3.5.1

Conversation

@kleisauke

Copy link
Copy Markdown
Collaborator

No description provided.

@sbc100
sbc100 requested a review from kripken September 4, 2026 16:49

@sbc100 sbc100 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No new or remove local patches?

@sbc100

sbc100 commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

This directory would be a great candidate for using git subtree ? I'm hoping to move some of our third_party deps over soon.

@kleisauke

Copy link
Copy Markdown
Collaborator Author

No new or remove local patches?

Indeed, no extra patches were made and all existing patches are reapplied as-is (see e.g. commit d70353c were these patches were removed and commit 4b56f61 were they were reapplied).

I only needed to modify tools/system_libs.py (to add the newly added prim-tls.c file) and rebase the codesize expectations for other.test_malloc_size_mimalloc_O2.

This directory would be a great candidate for using git subtree ? I'm hoping to move some of our third_party deps over soon.

I think this would be a good candidate (the design doc in PR #27593 looks interesting too). Hopefully we can just point it at the upstream sources without any patches. For example, the emscripten/prim.c patch should probably be fairly easy to upstream and the alloc-override.c patch seems doable as well (the only exception is those weak decls, which are only needed for the test_wrap_malloc_mimalloc test, afaik).

@kleisauke

Copy link
Copy Markdown
Collaborator Author

the only exception is those weak decls, which are only needed for the test_wrap_malloc_mimalloc test, afaik

I just confirmed this locally. After removing those weak decls, test_wrap_malloc_mimalloc fails with:

wasm-ld: error: duplicate symbol: free
>>> defined in /tmp/emscripten_temp_88xc3jzz/test_wrap_malloc.o
>>> defined in /home/kleisauke/emscripten/cache/sysroot/lib/wasm32-emscripten/libmimalloc.a(alloc.o)

wasm-ld: error: duplicate symbol: malloc
>>> defined in /tmp/emscripten_temp_88xc3jzz/test_wrap_malloc.o
>>> defined in /home/kleisauke/emscripten/cache/sysroot/lib/wasm32-emscripten/libmimalloc.a(alloc.o)

wasm-ld: error: duplicate symbol: realloc
>>> defined in /tmp/emscripten_temp_88xc3jzz/test_wrap_malloc.o
>>> defined in /home/kleisauke/emscripten/cache/sysroot/lib/wasm32-emscripten/libmimalloc.a(alloc.o)

@sbc100
sbc100 merged commit 9eca018 into emscripten-core:main Sep 4, 2026
42 checks passed
@kleisauke
kleisauke deleted the mimalloc-update-3.5.1 branch September 4, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants