diff options
| author | Jason Evans <jasone@canonware.com> | 2014-01-22 19:11:22 (GMT) |
|---|---|---|
| committer | Jason Evans <jasone@canonware.com> | 2014-01-22 19:11:22 (GMT) |
| commit | cc47dde16203a6ae7eb685b53e1ae501f3869bc6 (patch) | |
| tree | 74e81d65651b2ca7e294a857797dda6635177454 /src/chunk.c | |
| parent | 0135fb806e4137dc9cdf152541926a2bc95e33f0 (diff) | |
| parent | 798a48103014aabf8afb3d7efff90399a466dd8c (diff) | |
| download | jemalloc-3.5.0.zip jemalloc-3.5.0.tar.gz jemalloc-3.5.0.tar.bz2 | |
Merge branch 'dev'3.5.0
Diffstat (limited to 'src/chunk.c')
| -rw-r--r-- | src/chunk.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/chunk.c b/src/chunk.c index b17f43f..90ab116 100644 --- a/src/chunk.c +++ b/src/chunk.c @@ -180,7 +180,7 @@ chunk_alloc(size_t size, size_t alignment, bool base, bool *zero, label_return: if (ret != NULL) { if (config_ivsalloc && base == false) { - if (rtree_set(chunks_rtree, (uintptr_t)ret, ret)) { + if (rtree_set(chunks_rtree, (uintptr_t)ret, 1)) { chunk_dealloc(ret, size, true); return (NULL); } @@ -321,7 +321,7 @@ chunk_dealloc(void *chunk, size_t size, bool unmap) assert((size & chunksize_mask) == 0); if (config_ivsalloc) - rtree_set(chunks_rtree, (uintptr_t)chunk, NULL); + rtree_set(chunks_rtree, (uintptr_t)chunk, 0); if (config_stats || config_prof) { malloc_mutex_lock(&chunks_mtx); assert(stats_chunks.curchunks >= (size / chunksize)); @@ -356,7 +356,7 @@ chunk_boot(void) extent_tree_ad_new(&chunks_ad_dss); if (config_ivsalloc) { chunks_rtree = rtree_new((ZU(1) << (LG_SIZEOF_PTR+3)) - - opt_lg_chunk); + opt_lg_chunk, base_alloc, NULL); if (chunks_rtree == NULL) return (true); } @@ -368,7 +368,7 @@ void chunk_prefork(void) { - malloc_mutex_lock(&chunks_mtx); + malloc_mutex_prefork(&chunks_mtx); if (config_ivsalloc) rtree_prefork(chunks_rtree); chunk_dss_prefork(); |
