mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-06-17 17:35:39 +03:00
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.
This commit is contained in:
parent
c1ebfaa673
commit
2dfc5b5aac
4 changed files with 43 additions and 24 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue