Skip to content

Conversation

@theoparis
Copy link

@theoparis theoparis commented Sep 4, 2025

Upstream jemalloc is archived, and although there is a new fork by facebook it has no releases. Jemalloc causes issues on systems with a global allocator such as mimalloc, and on (aarch64) systems with a page size such as 16k or 64k. See tikv/jemallocator#122. Maybe it could be removed entirely from this crate but I don't know if this is desired.

@theoparis theoparis requested a review from a team as a code owner September 4, 2025 01:49
@google-cla
Copy link

google-cla bot commented Sep 4, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@danw
Copy link
Collaborator

danw commented Sep 8, 2025

Using something other than the default system allocator does improve performance by a good amount, and jemalloc is the allocator we have imported into the Android tree. But making it optional seems reasonable, as it is just for performance (and if you're enabling gperftools, you're already using a different allocator)

I haven't tried any performance testing with mimalloc, that could be an interesting alternative where that's available.

It looks like the tests are broken due to other reasons, I'll take a look at fixing them at some point (I've got a CL I was working on that should fix at least one of the problems)

@Colecf
Copy link
Collaborator

Colecf commented Sep 13, 2025

Could you make jemalloc a default feature?

@theoparis
Copy link
Author

Sure. I just saw this issue for tikv/jemallocator that might resolve my main concerns though.

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