Perform delayed coalescing prior to purging.

Rather than purging uncoalesced extents, perform just enough incremental
coalescing to purge only fully coalesced extents.  In the absence of
cached extent reuse, the immediate versus delayed incremental purging
algorithms result in the same purge order.

This resolves #655.
This commit is contained in:
Jason Evans
2017-03-02 18:04:35 -08:00
parent 8547ee11c3
commit e201e24904
6 changed files with 152 additions and 50 deletions

View File

@@ -116,8 +116,11 @@ 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;
/*
* If true, delay coalescing until eviction; otherwise coalesce during
* deallocation.
*/
bool delay_coalesce;
};
#endif /* JEMALLOC_INTERNAL_EXTENT_STRUCTS_H */