feat: add jemalloc as optional custom allocator#1679
Merged
andygrove merged 7 commits intoapache:mainfrom Apr 25, 2025
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1679 +/- ##
============================================
+ Coverage 56.12% 58.81% +2.68%
- Complexity 976 1082 +106
============================================
Files 119 125 +6
Lines 11743 12597 +854
Branches 2251 2362 +111
============================================
+ Hits 6591 7409 +818
- Misses 4012 4016 +4
- Partials 1140 1172 +32 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
The Spark SQL test does not seem related to the change. |
Contributor
|
Restarted the test |
# Conflicts: # native/Cargo.lock # native/core/Cargo.toml
parthchandra
approved these changes
Apr 25, 2025
coderfender
pushed a commit
to coderfender/datafusion-comet
that referenced
this pull request
Dec 13, 2025
* Add jemalloc, snmalloc, and tcmalloc. * Remove unnecessary check. rustc yelled at me if I tried to enable two. * Adjust snmalloc following instructions. * Remove tcmalloc since I can't get it to compile. * Fix jemalloc loading with dlopen. * Remove snmalloc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #1648.
Rationale for this change
Comet currently supports mimalloc to override the system memory allocator (
make release COMET_FEATURES=mimallocorcargo build --features=mimalloc). We want to explore jemalloc (tikv-jemallocator crate) as an alternative to mimalloc for our custom allocator. I will bring some discussion from #1648:#1648 (comment)
#1648 (comment)
#1648 (comment)
Other relevant reading:
What changes are included in this PR?
Add jemalloc as a feature accessible through
make release COMET_FEATURES=jemalloc. I had tcmalloc (Google) and snmalloc (Microsoft Research) as well, but the former failed to link at compilation time and the latter didn't like being loaded later as a dynamic library with Comet.How are these changes tested?