Move delay_coalesce from the eset to the ecache.

This commit is contained in:
David Goldblatt
2019-12-12 16:33:19 -08:00
committed by David Goldblatt
parent bb70df8e5b
commit 98eb40e563
5 changed files with 22 additions and 22 deletions

View File

@@ -8,6 +8,11 @@ typedef struct ecache_s ecache_t;
struct ecache_s {
malloc_mutex_t mtx;
eset_t eset;
/*
* If true, delay coalescing until eviction; otherwise coalesce during
* deallocation.
*/
bool delay_coalesce;
};
typedef struct ecache_grow_s ecache_grow_t;

View File

@@ -32,15 +32,9 @@ struct eset_s {
/* All stored extents must be in the same state. */
extent_state_t state;
/*
* If true, delay coalescing until eviction; otherwise coalesce during
* deallocation.
*/
bool delay_coalesce;
};
void eset_init(eset_t *eset, extent_state_t state, bool delay_coalesce);
void eset_init(eset_t *eset, extent_state_t state);
extent_state_t eset_state_get(const eset_t *eset);
size_t eset_npages_get(eset_t *eset);
@@ -55,6 +49,7 @@ void eset_remove(eset_t *eset, edata_t *edata);
* Select an extent from this eset of the given size and alignment. Returns
* null if no such item could be found.
*/
edata_t *eset_fit(eset_t *eset, size_t esize, size_t alignment);
edata_t *eset_fit(eset_t *eset, size_t esize, size_t alignment,
bool delay_coalesce);
#endif /* JEMALLOC_INTERNAL_ESET_H */