summaryrefslogtreecommitdiffstats
path: root/include/jemalloc
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2016-05-23 21:56:35 (GMT)
committerJason Evans <jasone@canonware.com>2016-06-03 19:27:41 (GMT)
commit6c944708222b3f1843ad224c88ffdafa02da1bb8 (patch)
tree413c434f633936f880b3c2b182eb832a0026e064 /include/jemalloc
parentde0305a7f3e443d48e012272e1b91c44d2b129d2 (diff)
downloadjemalloc-6c944708222b3f1843ad224c88ffdafa02da1bb8.zip
jemalloc-6c944708222b3f1843ad224c88ffdafa02da1bb8.tar.gz
jemalloc-6c944708222b3f1843ad224c88ffdafa02da1bb8.tar.bz2
Refactor chunk_dalloc_{cache,wrapper}() to take extent arguments.
Rename arena_extent_[d]alloc() to extent_[d]alloc(). Move all chunk [de]registration responsibility into chunk.c.
Diffstat (limited to 'include/jemalloc')
-rw-r--r--include/jemalloc/internal/arena.h7
-rw-r--r--include/jemalloc/internal/chunk.h8
-rw-r--r--include/jemalloc/internal/extent.h3
-rw-r--r--include/jemalloc/internal/private_symbols.txt7
4 files changed, 9 insertions, 16 deletions
diff --git a/include/jemalloc/internal/arena.h b/include/jemalloc/internal/arena.h
index 187b625..4e5e302 100644
--- a/include/jemalloc/internal/arena.h
+++ b/include/jemalloc/internal/arena.h
@@ -478,17 +478,14 @@ extent_t *arena_chunk_cache_alloc(tsdn_t *tsdn, arena_t *arena,
chunk_hooks_t *chunk_hooks, void *new_addr, size_t size, size_t alignment,
bool *zero);
void arena_chunk_cache_dalloc(tsdn_t *tsdn, arena_t *arena,
- chunk_hooks_t *chunk_hooks, void *chunk, size_t size, bool committed);
+ chunk_hooks_t *chunk_hooks, extent_t *extent);
void arena_chunk_cache_maybe_insert(arena_t *arena, extent_t *extent,
bool cache);
void arena_chunk_cache_maybe_remove(arena_t *arena, extent_t *extent,
bool cache);
-extent_t *arena_extent_alloc(tsdn_t *tsdn, arena_t *arena);
-void arena_extent_dalloc(tsdn_t *tsdn, arena_t *arena, extent_t *extent);
extent_t *arena_chunk_alloc_huge(tsdn_t *tsdn, arena_t *arena,
size_t usize, size_t alignment, bool *zero);
-void arena_chunk_dalloc_huge(tsdn_t *tsdn, arena_t *arena, void *chunk,
- size_t usize);
+void arena_chunk_dalloc_huge(tsdn_t *tsdn, arena_t *arena, extent_t *extent);
void arena_chunk_ralloc_huge_similar(tsdn_t *tsdn, arena_t *arena,
extent_t *extent, size_t oldsize);
void arena_chunk_ralloc_huge_shrink(tsdn_t *tsdn, arena_t *arena,
diff --git a/include/jemalloc/internal/chunk.h b/include/jemalloc/internal/chunk.h
index 78cc4c2..cef9fe0 100644
--- a/include/jemalloc/internal/chunk.h
+++ b/include/jemalloc/internal/chunk.h
@@ -52,9 +52,6 @@ chunk_hooks_t chunk_hooks_get(tsdn_t *tsdn, arena_t *arena);
chunk_hooks_t chunk_hooks_set(tsdn_t *tsdn, arena_t *arena,
const chunk_hooks_t *chunk_hooks);
-bool chunk_register(tsdn_t *tsdn, const extent_t *extent);
-void chunk_deregister(tsdn_t *tsdn, const extent_t *extent);
-void chunk_reregister(tsdn_t *tsdn, const extent_t *extent);
extent_t *chunk_alloc_cache(tsdn_t *tsdn, arena_t *arena,
chunk_hooks_t *chunk_hooks, void *new_addr, size_t size, size_t alignment,
bool *zero);
@@ -62,10 +59,9 @@ extent_t *chunk_alloc_wrapper(tsdn_t *tsdn, arena_t *arena,
chunk_hooks_t *chunk_hooks, void *new_addr, size_t size, size_t alignment,
bool *zero, bool *commit);
void chunk_dalloc_cache(tsdn_t *tsdn, arena_t *arena,
- chunk_hooks_t *chunk_hooks, void *chunk, size_t size, bool committed);
+ chunk_hooks_t *chunk_hooks, extent_t *extent);
void chunk_dalloc_wrapper(tsdn_t *tsdn, arena_t *arena,
- chunk_hooks_t *chunk_hooks, void *chunk, size_t size, bool zeroed,
- bool committed);
+ chunk_hooks_t *chunk_hooks, extent_t *extent);
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);
diff --git a/include/jemalloc/internal/extent.h b/include/jemalloc/internal/extent.h
index 82da800..cfc908d 100644
--- a/include/jemalloc/internal/extent.h
+++ b/include/jemalloc/internal/extent.h
@@ -62,6 +62,9 @@ typedef ph(extent_t) extent_heap_t;
/******************************************************************************/
#ifdef JEMALLOC_H_EXTERNS
+extent_t *extent_alloc(tsdn_t *tsdn, arena_t *arena);
+void extent_dalloc(tsdn_t *tsdn, arena_t *arena, extent_t *extent);
+
#ifdef JEMALLOC_JET
typedef size_t (extent_size_quantize_t)(size_t);
extern extent_size_quantize_t *extent_size_quantize_floor;
diff --git a/include/jemalloc/internal/private_symbols.txt b/include/jemalloc/internal/private_symbols.txt
index 34a6816..8998aed 100644
--- a/include/jemalloc/internal/private_symbols.txt
+++ b/include/jemalloc/internal/private_symbols.txt
@@ -37,8 +37,6 @@ arena_decay_time_get
arena_decay_time_set
arena_dss_prec_get
arena_dss_prec_set
-arena_extent_alloc
-arena_extent_dalloc
arena_get
arena_ichoose
arena_init
@@ -166,7 +164,6 @@ chunk_dalloc_cache
chunk_dalloc_mmap
chunk_dalloc_wrapper
chunk_decommit_wrapper
-chunk_deregister
chunk_dss_boot
chunk_dss_postfork_child
chunk_dss_postfork_parent
@@ -184,8 +181,6 @@ chunk_postfork_child
chunk_postfork_parent
chunk_prefork
chunk_purge_wrapper
-chunk_register
-chunk_reregister
chunk_split_wrapper
chunks_rtree
chunksize
@@ -214,10 +209,12 @@ extent_active_get
extent_active_set
extent_addr_get
extent_addr_set
+extent_alloc
extent_arena_get
extent_arena_set
extent_committed_get
extent_committed_set
+extent_dalloc
extent_dirty_insert
extent_dirty_remove
extent_init