diff options
author | Jason Evans <je@fb.com> | 2012-10-11 20:53:15 (GMT) |
---|---|---|
committer | Jason Evans <je@fb.com> | 2012-10-13 01:26:16 (GMT) |
commit | 609ae595f0358157b19311b0f9f9591db7cee705 (patch) | |
tree | 2a51758c6218f26167eb8ad2155ccc925c898c3b /src/huge.c | |
parent | d0ffd8ed4f6aa4cf7248028eddfcb35f93247fe4 (diff) | |
download | jemalloc-609ae595f0358157b19311b0f9f9591db7cee705.zip jemalloc-609ae595f0358157b19311b0f9f9591db7cee705.tar.gz jemalloc-609ae595f0358157b19311b0f9f9591db7cee705.tar.bz2 |
Add arena-specific and selective dss allocation.
Add the "arenas.extend" mallctl, so that it is possible to create new
arenas that are outside the set that jemalloc automatically multiplexes
threads onto.
Add the ALLOCM_ARENA() flag for {,r,d}allocm(), so that it is possible
to explicitly allocate from a particular arena.
Add the "opt.dss" mallctl, which controls the default precedence of dss
allocation relative to mmap allocation.
Add the "arena.<i>.dss" mallctl, which makes it possible to set the
default dss precedence on a per arena or global basis.
Add the "arena.<i>.purge" mallctl, which obsoletes "arenas.purge".
Add the "stats.arenas.<i>.dss" mallctl.
Diffstat (limited to 'src/huge.c')
-rw-r--r-- | src/huge.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -48,7 +48,8 @@ huge_palloc(size_t size, size_t alignment, bool zero) * it is possible to make correct junk/zero fill decisions below. */ is_zeroed = zero; - ret = chunk_alloc(csize, alignment, false, &is_zeroed); + ret = chunk_alloc(csize, alignment, false, &is_zeroed, + chunk_dss_prec_get()); if (ret == NULL) { base_node_dealloc(node); return (NULL); @@ -101,7 +102,7 @@ huge_ralloc_no_move(void *ptr, size_t oldsize, size_t size, size_t extra) void * huge_ralloc(void *ptr, size_t oldsize, size_t size, size_t extra, - size_t alignment, bool zero) + size_t alignment, bool zero, bool try_tcache_dalloc) { void *ret; size_t copysize; @@ -180,7 +181,7 @@ huge_ralloc(void *ptr, size_t oldsize, size_t size, size_t extra, #endif { memcpy(ret, ptr, copysize); - iqalloc(ptr); + iqallocx(ptr, try_tcache_dalloc); } return (ret); } |