Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake option to link jemalloc #166

Open
jiridanek opened this issue Mar 11, 2022 · 2 comments
Open

CMake option to link jemalloc #166

jiridanek opened this issue Mar 11, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@jiridanek
Copy link
Contributor

http://jemalloc.net/

@jiridanek jiridanek added the enhancement New feature or request label Mar 11, 2022
@jiridanek jiridanek self-assigned this Mar 11, 2022
@ganeshmurthy ganeshmurthy added this to the 3.0.0 milestone Apr 12, 2022
@jiridanek
Copy link
Contributor Author

jiridanek commented May 26, 2022

What to do with this? It might be best to go about it in three steps.

  • First, add options to enable many possible alternative allocators in turn, easily, so that they can be tested with ease. This is important because allocators are tunable and tuning matters.
  • Then, create abstraction over the common allocator extended API so that also the advanced features that go beyond malloc/free of each allocator can be tested (they include observability into what was allocated, and so on). This is necessary if the alloc_pool features are to be replaced with 3rd party allocator
  • Finally, pick one allocator to build with, probably leave the abstraction in place, possibly even keep one or two alternative allocators for possibility of future retesting and reevaluation.

List of notable alternative allocators, from https://crates.io/crates/shadowsocks-rust build options

  • jemalloc - Uses jemalloc as global memory allocator
  • mimalloc - Uses mi-malloc as global memory allocator
  • tcmalloc - Uses TCMalloc as global memory allocator. It tries to link system-wide tcmalloc by default, use vendored from source with tcmalloc-vendored.
  • snmalloc - Uses snmalloc as global memory allocator
  • rpmalloc - Uses rpmalloc as global memory allocator

tcmalloc is from google, jemalloc is facebook and openjdk, mimalloc is microsoft

@jiridanek
Copy link
Contributor Author

@ganeshmurthy ganeshmurthy removed this from the 3.0.0 milestone Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants