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

mr_allocator: set the default value of retain in je #117

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,12 @@
# So we disable `tcache` by default.
# If you want to enable `tcache` and make sure safety by yourself, change
# `JEMALLOC_SYS_WITH_MALLOC_CONF` from `tcache:false` to `tcache:true`.
JEMALLOC_SYS_WITH_MALLOC_CONF = "narenas:1,tcache:false"

# If `retain` is true, retain unused virtual memory for later reuse rather than discarding it by calling
# munmap(2) or equivalent (see stats.retained for related details). It also makes jemalloc use mmap(2) or
# equivalent in a more greedy way, mapping larger chunks in one go. This option is disabled by default.
# Quoted from: https://jemalloc.net/jemalloc.3.html
# Retain sometimes leads to issues with using already deallocated MR, so it is set to false by default.
# If we need to enable this feature, we will need to reconsider the retain logic of jemalloc and ensure
# that MR is re-registered and the metadata is re-inserted in `EXTENT_TOKEN_MAP` before being reused.
JEMALLOC_SYS_WITH_MALLOC_CONF = "narenas:1,tcache:false,retain:false"
Loading