Skip to content

deps: mimalloc to oven-sh/mimalloc#62 (mi_on_thread_idle_pending_own) - #47042

Draft
robobun wants to merge 1 commit into
mainfrom
robobun/1a8bcc9f/mimalloc-idle-pending-own
Draft

robobun wants to merge 1 commit into
mainfrom
robobun/1a8bcc9f/mimalloc-idle-pending-own

Conversation

@robobun

@robobun robobun commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

MIMALLOC_COMMIT is the head of oven-sh/mimalloc#62. Move it to the merged commit before this lands.

Behaviour change: none

Problem

Fix

  • Move MIMALLOC_COMMIT to theap: mi_on_thread_idle_pending_own, for a thread that comes back only for its own large pages mimalloc#62, alone, before the WebKit change. It adds the export and one flag in padding of mi_tld_t.
  • Correct because nothing calls the export yet. sizeof(mi_tld_t) stays 248, and mi_malloc and mi_free compile to the same bytes.
  • Verified: a release build for Linux x64 links and passes test/js/bun/jsc (312 pass), test/js/bun/wasm, test/js/web/atomics.test.ts and test/js/web/workers (444 pass). mimalloc's own suite passes 41 of 41 with the new test cases.

Background

Downsides

  • None found. Checked: mimalloc .text grows by 139 bytes, 697 of 703 code sections are identical, and an idle sweep makes two more byte stores.

The new commit adds an export that nothing calls yet, and a flag in padding
of mi_tld_t. oven-sh/WebKit#911 is the caller.

MIMALLOC_COMMIT is the head of oven-sh/mimalloc#62. It moves to the merged
commit before this lands.
@robobun

robobun commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator Author
Updated 3:27 AM PT - Oct 27th, 2026

✅ @robobun, your commit 451f7c4e891063940c82cdbc826592bf0db7382e passed in Build #133529! 🎉


🧪   To try this PR locally:

bunx bun-pr 47042

That installs a local version of the PR into your bun-47042 executable, so you can run:

bun-47042 --bun

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant