diff options
author | Jason Evans <jasone@canonware.com> | 2016-05-23 22:04:40 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2016-06-03 19:27:41 (GMT) |
commit | 0eb6f08959700428f3ae0df1d8ab1cd7bd4c82bc (patch) | |
tree | 6d2bcd896095b7c3d57c235c556d5ace174fbc0d /src/chunk.c | |
parent | 6c944708222b3f1843ad224c88ffdafa02da1bb8 (diff) | |
download | jemalloc-0eb6f08959700428f3ae0df1d8ab1cd7bd4c82bc.zip jemalloc-0eb6f08959700428f3ae0df1d8ab1cd7bd4c82bc.tar.gz jemalloc-0eb6f08959700428f3ae0df1d8ab1cd7bd4c82bc.tar.bz2 |
Refactor chunk_[de]commit_wrapper() to take extent arguments.
Diffstat (limited to 'src/chunk.c')
-rw-r--r-- | src/chunk.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/chunk.c b/src/chunk.c index d076321..363ce8f 100644 --- a/src/chunk.c +++ b/src/chunk.c @@ -695,11 +695,12 @@ chunk_commit_default(void *chunk, size_t size, size_t offset, size_t length, bool chunk_commit_wrapper(tsdn_t *tsdn, arena_t *arena, chunk_hooks_t *chunk_hooks, - void *chunk, size_t size, size_t offset, size_t length) + extent_t *extent, size_t offset, size_t length) { chunk_hooks_assure_initialized(tsdn, arena, chunk_hooks); - return (chunk_hooks->commit(chunk, size, offset, length, arena->ind)); + return (chunk_hooks->commit(extent_addr_get(extent), + extent_size_get(extent), offset, length, arena->ind)); } static bool @@ -713,11 +714,12 @@ chunk_decommit_default(void *chunk, size_t size, size_t offset, size_t length, bool chunk_decommit_wrapper(tsdn_t *tsdn, arena_t *arena, chunk_hooks_t *chunk_hooks, - void *chunk, size_t size, size_t offset, size_t length) + extent_t *extent, size_t offset, size_t length) { chunk_hooks_assure_initialized(tsdn, arena, chunk_hooks); - return (chunk_hooks->decommit(chunk, size, offset, length, arena->ind)); + return (chunk_hooks->decommit(extent_addr_get(extent), + extent_size_get(extent), offset, length, arena->ind)); } static bool |