diff options
author | Qi Wang <interwq@gwu.edu> | 2017-11-14 16:09:31 -0800 |
---|---|---|
committer | Qi Wang <interwq@gmail.com> | 2017-11-16 15:32:02 -0800 |
commit | eb1b08daaea57d16ce720d97847d94cee2f867cc (patch) | |
tree | 65ff10b09f681093b0eb8bd615f98b65459a58f2 /include | |
parent | fac706836ffda46759914508b918e8b54c8020c8 (diff) | |
download | platform_external_jemalloc_new-eb1b08daaea57d16ce720d97847d94cee2f867cc.tar.gz platform_external_jemalloc_new-eb1b08daaea57d16ce720d97847d94cee2f867cc.tar.bz2 platform_external_jemalloc_new-eb1b08daaea57d16ce720d97847d94cee2f867cc.zip |
Fix an extent coalesce bug.
When coalescing, we should take both extents off the LRU list; otherwise decay
can grab the existing outer extent through extents_evict.
Diffstat (limited to 'include')
-rw-r--r-- | include/jemalloc/internal/extent_inlines.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/jemalloc/internal/extent_inlines.h b/include/jemalloc/internal/extent_inlines.h index 9f5c5cd2..9b8ddc27 100644 --- a/include/jemalloc/internal/extent_inlines.h +++ b/include/jemalloc/internal/extent_inlines.h @@ -356,6 +356,11 @@ extent_list_append(extent_list_t *list, extent_t *extent) { } static inline void +extent_list_prepend(extent_list_t *list, extent_t *extent) { + ql_head_insert(list, extent, ql_link); +} + +static inline void extent_list_replace(extent_list_t *list, extent_t *to_remove, extent_t *to_insert) { ql_after_insert(to_remove, to_insert, ql_link); |