improve handling of huge pages in the cache

This commit is contained in:
daan 2019-06-23 23:15:42 -07:00
parent 43568fa422
commit cd7aa0ce83
5 changed files with 86 additions and 39 deletions

View file

@ -370,9 +370,10 @@ typedef struct mi_segment_queue_s {
// Segments thread local data
typedef struct mi_segments_tld_s {
mi_segment_queue_t small_free; // queue of segments with free small pages
size_t count; // current number of segments
size_t peak; // peak number of segments
size_t current_size; // current size of all segments
size_t peak_size; // peak size of all segments
size_t cache_count; // number of segments in the cache
size_t cache_size; // total size of all segments in the cache
mi_segment_queue_t cache; // (small) cache of segments for small and large pages (to avoid repeated mmap calls)
mi_stats_t* stats; // points to tld stats
} mi_segments_tld_t;