summaryrefslogtreecommitdiffstats
path: root/include/jemalloc
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2017-02-13 07:18:57 (GMT)
committerJason Evans <jasone@canonware.com>2017-02-17 04:11:50 (GMT)
commit2dfc5b5aac983f8f192c63c604a59fed8b39e937 (patch)
treea948df54499ede315bf482a5dddb0bbf9dc524d3 /include/jemalloc
parentc1ebfaa673f769eff399fc5806591b3a4782a9c5 (diff)
downloadjemalloc-2dfc5b5aac983f8f192c63c604a59fed8b39e937.zip
jemalloc-2dfc5b5aac983f8f192c63c604a59fed8b39e937.tar.gz
jemalloc-2dfc5b5aac983f8f192c63c604a59fed8b39e937.tar.bz2
Disable coalescing of cached extents.
Extent splitting and coalescing is a major component of large allocation overhead, and disabling coalescing of cached extents provides a simple and effective hysteresis mechanism. Once two-phase purging is implemented, it will probably make sense to leave coalescing disabled for the first phase, but coalesce during the second phase.
Diffstat (limited to 'include/jemalloc')
-rw-r--r--include/jemalloc/internal/extent_externs.h3
-rw-r--r--include/jemalloc/internal/extent_structs.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/include/jemalloc/internal/extent_externs.h b/include/jemalloc/internal/extent_externs.h
index a355611..d971ec3 100644
--- a/include/jemalloc/internal/extent_externs.h
+++ b/include/jemalloc/internal/extent_externs.h
@@ -21,7 +21,8 @@ size_t extent_size_quantize_ceil(size_t size);
ph_proto(, extent_heap_, extent_heap_t, extent_t)
-bool extents_init(tsdn_t *tsdn, extents_t *extents, extent_state_t state);
+bool extents_init(tsdn_t *tsdn, extents_t *extents, extent_state_t state,
+ bool try_coalesce);
extent_state_t extents_state_get(const extents_t *extents);
size_t extents_npages_get(extents_t *extents);
extent_t *extents_evict(tsdn_t *tsdn, extents_t *extents, size_t npages_min);
diff --git a/include/jemalloc/internal/extent_structs.h b/include/jemalloc/internal/extent_structs.h
index 33ca4ac..008b635 100644
--- a/include/jemalloc/internal/extent_structs.h
+++ b/include/jemalloc/internal/extent_structs.h
@@ -115,6 +115,9 @@ struct extents_s {
/* All stored extents must be in the same state. */
extent_state_t state;
+
+ /* If true, try to coalesce during extent deallocation. */
+ bool try_coalesce;
};
#endif /* JEMALLOC_INTERNAL_EXTENT_STRUCTS_H */