Skip to content

Add cfg(foundations_jemalloc_disable) to opt out of global jemalloc allocator#216

Merged
TheJokr merged 3 commits into
mainfrom
lblocher/jemalloc-cfg-flag
Jun 10, 2026
Merged

Add cfg(foundations_jemalloc_disable) to opt out of global jemalloc allocator#216
TheJokr merged 3 commits into
mainfrom
lblocher/jemalloc-cfg-flag

Conversation

@TheJokr

@TheJokr TheJokr commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Usually our advice would be to not enable the jemalloc cargo feature,
but this becomes difficult in large dependency trees where a user may
not necessarily control all dependencies that in turn depend on
foundations. Providing a flag to disable the #[global_allocator]
specifically allows such projects to build anyway.

This is also useful to enable ASAN builds, which otherwise wouldn't
cover allocations initiated from Rust.

Includes a release commit for foundations 5.7.3.

TheJokr added 2 commits June 10, 2026 10:45
…llocator

Usually our advice would be to not enable the `jemalloc` cargo feature,
but this becomes difficult in large dependency trees where a user may
not necessarily control all dependencies that in turn depend on
foundations. Providing a flag to disable the `#[global_allocator]`
specifically allows such projects to build anyway.

This is also useful to enable ASAN builds, which otherwise wouldn't
cover allocations initiated from Rust.
@TheJokr TheJokr requested a review from fisherdarling June 10, 2026 10:50
@TheJokr TheJokr self-assigned this Jun 10, 2026
@TheJokr TheJokr merged commit b42f077 into main Jun 10, 2026
20 checks passed
@TheJokr TheJokr deleted the lblocher/jemalloc-cfg-flag branch June 10, 2026 11:08
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.

2 participants