mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
Implement free space mask for abandoned segments at the arena level
This commit is contained in:
parent
94bdbe41bb
commit
6a7b0ff591
8 changed files with 224 additions and 115 deletions
|
@ -131,6 +131,9 @@ void _mi_arena_unsafe_destroy_all(mi_stats_t* stats);
|
|||
|
||||
bool _mi_arena_segment_clear_abandoned(mi_segment_t* segment);
|
||||
void _mi_arena_segment_mark_abandoned(mi_segment_t* segment);
|
||||
void _mi_arena_segment_abandon_begin(mi_segment_t* segment);
|
||||
void _mi_arena_segment_abandon_end(mi_segment_t* segment);
|
||||
void _mi_arena_segment_abandoned_mark_free_page(mi_segment_t* segment, size_t free_space_mask);
|
||||
size_t _mi_arena_segment_abandoned_count(void);
|
||||
|
||||
typedef struct mi_arena_field_cursor_s { // abstract
|
||||
|
|
|
@ -709,6 +709,7 @@ typedef struct mi_segments_tld_s {
|
|||
mi_span_queue_t large_spans[MI_SEGMENT_BIN_MAX+1]; // free slice spans inside large segments
|
||||
mi_segment_t* medium_segment;
|
||||
mi_segment_t* large_segment;
|
||||
bool freeing_segments_disabled; // used to ensure the state of the heap remains consistent while the excess of segments is being dropped
|
||||
size_t count; // current number of segments;
|
||||
size_t peak_count; // peak number of segments
|
||||
size_t current_size; // current size of all segments
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue