summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2016-05-17 21:58:56 (GMT)
committerJason Evans <jasone@canonware.com>2016-06-03 19:27:41 (GMT)
commitfc0372a15e6486d69e6f5f4c2b656aafbb013850 (patch)
treeaeb433f4ae8ab1fbc0af6dffa71f44e0dc927bbe /include
parentffa45a53314d3ff4376c753c5609689d0f65f0e8 (diff)
downloadjemalloc-fc0372a15e6486d69e6f5f4c2b656aafbb013850.zip
jemalloc-fc0372a15e6486d69e6f5f4c2b656aafbb013850.tar.gz
jemalloc-fc0372a15e6486d69e6f5f4c2b656aafbb013850.tar.bz2
Replace extent_tree_szad_* with extent_heap_*.
Diffstat (limited to 'include')
-rw-r--r--include/jemalloc/internal/arena.h6
-rw-r--r--include/jemalloc/internal/extent.h17
-rw-r--r--include/jemalloc/internal/private_symbols.txt21
3 files changed, 18 insertions, 26 deletions
diff --git a/include/jemalloc/internal/arena.h b/include/jemalloc/internal/arena.h
index 97b5329..b6bfb25 100644
--- a/include/jemalloc/internal/arena.h
+++ b/include/jemalloc/internal/arena.h
@@ -418,11 +418,11 @@ struct arena_s {
malloc_mutex_t huge_mtx;
/*
- * Trees of chunks that were previously allocated. These are used when
+ * Heaps of chunks that were previously allocated. These are used when
* allocating chunks, in an attempt to re-use address space.
*/
- extent_tree_t chunks_szad_cached;
- extent_tree_t chunks_szad_retained;
+ extent_heap_t chunks_cached[NPSIZES];
+ extent_heap_t chunks_retained[NPSIZES];
malloc_mutex_t chunks_mtx;
/* Cache of extent structures that were allocated via base_alloc(). */
diff --git a/include/jemalloc/internal/extent.h b/include/jemalloc/internal/extent.h
index f067a29..82da800 100644
--- a/include/jemalloc/internal/extent.h
+++ b/include/jemalloc/internal/extent.h
@@ -49,20 +49,29 @@ struct extent_s {
qr(extent_t) cc_link;
union {
- /* Linkage for the size/address-ordered tree. */
- rb_node(extent_t) szad_link;
+ /* Linkage for per size class address-ordered heaps. */
+ phn(extent_t) ph_link;
/* Linkage for arena's achunks, huge, and node_cache lists. */
ql_elm(extent_t) ql_link;
};
};
-typedef rb_tree(extent_t) extent_tree_t;
+typedef ph(extent_t) extent_heap_t;
#endif /* JEMALLOC_H_STRUCTS */
/******************************************************************************/
#ifdef JEMALLOC_H_EXTERNS
-rb_proto(, extent_tree_szad_, extent_tree_t, extent_t)
+#ifdef JEMALLOC_JET
+typedef size_t (extent_size_quantize_t)(size_t);
+extern extent_size_quantize_t *extent_size_quantize_floor;
+extern extent_size_quantize_t *extent_size_quantize_ceil;
+#else
+size_t extent_size_quantize_floor(size_t size);
+size_t extent_size_quantize_ceil(size_t size);
+#endif
+
+ph_proto(, extent_heap_, extent_heap_t, extent_t)
#endif /* JEMALLOC_H_EXTERNS */
/******************************************************************************/
diff --git a/include/jemalloc/internal/private_symbols.txt b/include/jemalloc/internal/private_symbols.txt
index 247b873..b3d1860 100644
--- a/include/jemalloc/internal/private_symbols.txt
+++ b/include/jemalloc/internal/private_symbols.txt
@@ -222,27 +222,10 @@ extent_prof_tctx_set
extent_retained_get
extent_size_get
extent_size_set
+extent_size_quantize_ceil
+extent_size_quantize_floor
extent_slab_get
extent_slab_set
-extent_tree_szad_destroy
-extent_tree_szad_destroy_recurse
-extent_tree_szad_empty
-extent_tree_szad_first
-extent_tree_szad_insert
-extent_tree_szad_iter
-extent_tree_szad_iter_recurse
-extent_tree_szad_iter_start
-extent_tree_szad_last
-extent_tree_szad_new
-extent_tree_szad_next
-extent_tree_szad_nsearch
-extent_tree_szad_prev
-extent_tree_szad_psearch
-extent_tree_szad_remove
-extent_tree_szad_reverse_iter
-extent_tree_szad_reverse_iter_recurse
-extent_tree_szad_reverse_iter_start
-extent_tree_szad_search
extent_zeroed_get
extent_zeroed_set
ffs_llu