mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-06 15:29:31 +03:00
experiment with smaller segment size (32MiB) and finer minimal commit (1MiB)
This commit is contained in:
parent
ba8c0f8903
commit
b940543cd5
1 changed files with 2 additions and 2 deletions
|
@ -132,7 +132,7 @@ typedef int32_t mi_ssize_t;
|
||||||
|
|
||||||
// Main tuning parameters for segment and page sizes
|
// Main tuning parameters for segment and page sizes
|
||||||
// Sizes for 64-bit (usually divide by two for 32-bit)
|
// Sizes for 64-bit (usually divide by two for 32-bit)
|
||||||
#define MI_SEGMENT_SLICE_SHIFT (13 + MI_INTPTR_SHIFT) // 64KiB (32KiB on 32-bit)
|
#define MI_SEGMENT_SLICE_SHIFT (12 + MI_INTPTR_SHIFT) // 64KiB (32KiB on 32-bit)
|
||||||
|
|
||||||
#if MI_INTPTR_SIZE > 4
|
#if MI_INTPTR_SIZE > 4
|
||||||
#define MI_SEGMENT_SHIFT (10 + MI_SEGMENT_SLICE_SHIFT) // 64MiB
|
#define MI_SEGMENT_SHIFT (10 + MI_SEGMENT_SLICE_SHIFT) // 64MiB
|
||||||
|
@ -324,7 +324,7 @@ typedef enum mi_segment_kind_e {
|
||||||
// is still tracked in fine-grained MI_COMMIT_SIZE chunks)
|
// is still tracked in fine-grained MI_COMMIT_SIZE chunks)
|
||||||
// ------------------------------------------------------
|
// ------------------------------------------------------
|
||||||
|
|
||||||
#define MI_MINIMAL_COMMIT_SIZE (2*MI_MiB)
|
#define MI_MINIMAL_COMMIT_SIZE (MI_MiB)
|
||||||
#define MI_COMMIT_SIZE (MI_SEGMENT_SLICE_SIZE) // 64KiB
|
#define MI_COMMIT_SIZE (MI_SEGMENT_SLICE_SIZE) // 64KiB
|
||||||
#define MI_COMMIT_MASK_BITS (MI_SEGMENT_SIZE / MI_COMMIT_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_BITS MI_SIZE_BITS
|
||||||
|
|
Loading…
Add table
Reference in a new issue