diff options
author | Jason Evans <jasone@canonware.com> | 2016-05-18 01:17:04 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2016-06-03 19:27:41 (GMT) |
commit | 56e0031d7d0c69c54de4bae1ca3a2fd2823f69ff (patch) | |
tree | 05fe46340c5b76907990bb7a273bcc810c75c7be /src/arena.c | |
parent | 4d2d9cec5a82c80e0cabb1c4fc0473aca0cc5a09 (diff) | |
download | jemalloc-56e0031d7d0c69c54de4bae1ca3a2fd2823f69ff.zip jemalloc-56e0031d7d0c69c54de4bae1ca3a2fd2823f69ff.tar.gz jemalloc-56e0031d7d0c69c54de4bae1ca3a2fd2823f69ff.tar.bz2 |
Add/use chunk_decommit_wrapper().
Diffstat (limited to 'src/arena.c')
-rw-r--r-- | src/arena.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/arena.c b/src/arena.c index 720219d..ee65194 100644 --- a/src/arena.c +++ b/src/arena.c @@ -552,8 +552,8 @@ arena_chunk_alloc_internal_hard(tsdn_t *tsdn, arena_t *arena, if (chunk != NULL && arena_chunk_register(tsdn, arena, chunk, *zero)) { if (!*commit) { /* Undo commit of header. */ - chunk_hooks->decommit(chunk, chunksize, 0, map_bias << - LG_PAGE, arena->ind); + chunk_decommit_wrapper(tsdn, arena, chunk_hooks, + chunk, chunksize, 0, map_bias << LG_PAGE); } chunk_dalloc_wrapper(tsdn, arena, chunk_hooks, (void *)chunk, chunksize, *zero, *commit); @@ -675,9 +675,8 @@ arena_chunk_discard(tsdn_t *tsdn, arena_t *arena, arena_chunk_t *chunk) * chunk as committed has a high potential for causing later * access of decommitted memory. */ - chunk_hooks = chunk_hooks_get(tsdn, arena); - chunk_hooks.decommit(chunk, chunksize, 0, map_bias << LG_PAGE, - arena->ind); + chunk_decommit_wrapper(tsdn, arena, &chunk_hooks, chunk, + chunksize, 0, map_bias << LG_PAGE); } chunk_dalloc_cache(tsdn, arena, &chunk_hooks, (void *)chunk, chunksize, @@ -1603,8 +1602,9 @@ arena_purge_stashed(tsdn_t *tsdn, arena_t *arena, chunk_hooks_t *chunk_hooks, assert(!arena_mapbits_decommitted_get(chunk, pageind)); assert(!arena_mapbits_decommitted_get(chunk, pageind+npages-1)); - decommitted = !chunk_hooks->decommit(chunk, chunksize, - pageind << LG_PAGE, npages << LG_PAGE, arena->ind); + decommitted = !chunk_decommit_wrapper(tsdn, arena, + chunk_hooks, chunk, chunksize, pageind << LG_PAGE, + npages << LG_PAGE); if (decommitted) { flag_unzeroed = 0; flags = CHUNK_MAP_DECOMMITTED; |