summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2017-04-17 01:39:14 (GMT)
committerJason Evans <jasone@canonware.com>2017-04-17 21:47:45 (GMT)
commit69aa5528091db805accc32af8d350f32b91bfd1a (patch)
tree501143c9b97c9c11f847082f42c00a4016b7bb5a /include
parent675701660cede59972707f60af32117023f91728 (diff)
downloadjemalloc-69aa5528091db805accc32af8d350f32b91bfd1a.zip
jemalloc-69aa5528091db805accc32af8d350f32b91bfd1a.tar.gz
jemalloc-69aa5528091db805accc32af8d350f32b91bfd1a.tar.bz2
Allocate increasingly large base blocks.
Limit the total number of base block by leveraging the exponential size class sequence, similarly to extent_grow_retained().
Diffstat (limited to 'include')
-rw-r--r--include/jemalloc/internal/base_structs.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/jemalloc/internal/base_structs.h b/include/jemalloc/internal/base_structs.h
index 13d5bd4..d79f38e 100644
--- a/include/jemalloc/internal/base_structs.h
+++ b/include/jemalloc/internal/base_structs.h
@@ -21,11 +21,18 @@ struct base_s {
* User-configurable extent hook functions. Points to an
* extent_hooks_t.
*/
- atomic_p_t extent_hooks;
+ atomic_p_t extent_hooks;
/* Protects base_alloc() and base_stats_get() operations. */
malloc_mutex_t mtx;
+ /*
+ * Most recent size class in the series of increasingly large base
+ * extents. Logarithmic spacing between subsequent allocations ensures
+ * that the total number of distinct mappings remains small.
+ */
+ pszind_t pind_last;
+
/* Serial number generation state. */
size_t extent_sn_next;