mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-01 17:24:38 +03:00
increase commit mask blocks to 2xslice size
This commit is contained in:
parent
7e22e5ce6e
commit
511a8996f3
2 changed files with 4 additions and 5 deletions
|
@ -308,12 +308,11 @@ typedef enum mi_segment_kind_e {
|
|||
// A segment holds a commit mask where a bit is set if
|
||||
// the corresponding MI_COMMIT_SIZE area is committed.
|
||||
// The MI_COMMIT_SIZE must be a multiple of the slice
|
||||
// size. We define it as equal so we can decommit on a
|
||||
// slice level which helps with (real) memory fragmentation
|
||||
// over time.
|
||||
// size. If it is equal we have the most fine grained
|
||||
// decommit but in practice 2x seems to perform better.
|
||||
// ------------------------------------------------------
|
||||
|
||||
#define MI_COMMIT_SIZE (MI_SEGMENT_SLICE_SIZE)
|
||||
#define MI_COMMIT_SIZE (2*MI_SEGMENT_SLICE_SIZE)
|
||||
#define MI_COMMIT_MASK_BITS (MI_SEGMENT_SIZE / MI_COMMIT_SIZE)
|
||||
#define MI_COMMIT_MASK_FIELD_BITS MI_SIZE_BITS
|
||||
#define MI_COMMIT_MASK_FIELD_COUNT (MI_COMMIT_MASK_BITS / MI_COMMIT_MASK_FIELD_BITS)
|
||||
|
|
|
@ -583,7 +583,7 @@ static void mi_segment_perhaps_decommit(mi_segment_t* segment, uint8_t* p, size_
|
|||
}
|
||||
else {
|
||||
// previous decommit mask is not yet expired
|
||||
// segment->decommit_expire += 1; // = now + mi_option_get(mi_option_reset_delay);
|
||||
// segment->decommit_expire += 2; // = now + mi_option_get(mi_option_reset_delay);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue