Repository navigation
Support prefixed jemalloc when USE_JEMALLOC is enabled - #2723
adamant-pwn wants to merge 1 commit into
Conversation
|
Hi @adamant-pwn! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
2c06de8 to
0074a54
Compare
With
USE_JEMALLOC, Folly calls unprefixed allocator helpers even when jemalloc was built with a symbol prefix (as on conda-forge macOS). Weak declarations can let this compile while calls still resolve to missing functions. Bind these helpers through jemalloc's documentedje_*aliases in Folly's portability header, leaving standard allocation names and automatic allocator detection unchanged.Retain the
je_*aliases withJEMALLOC_NO_DEMANGLE, including for consumers that include jemalloc first. Register the existing MallocTest suite with CMake and add an allocation/deallocation smoke test. This smoke test alone does not establish prefixed-allocator compatibility.Tested: 101 selected allocator/vector tests pass with unprefixed jemalloc 5.4.0. A separate Linux link-and-run reproduction with prefixed jemalloc 5.4.0 crashes without the patch and passes with it. Mac header probes compile, but full native Mac and Rosetta runtime validation of this upstream version is pending.
Prepared with AI assistance; this PR remains a draft for review.