mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 11:34:38 +03:00
comments
This commit is contained in:
parent
037cb167f8
commit
d9397be178
2 changed files with 9 additions and 4 deletions
|
@ -210,15 +210,20 @@ bool _mi_bitmap_forall_set_ranges(mi_bitmap_t* bitmap, mi_forall_set_fun_t* visi
|
|||
/* ----------------------------------------------------------------------------
|
||||
Binned concurrent bitmap
|
||||
Assigns a size class to each chunk such that small blocks don't cause too
|
||||
much fragmentation by keeping chunks for larger blocks separate.
|
||||
much fragmentation since we keep chunks for larger blocks separate.
|
||||
---------------------------------------------------------------------------- */
|
||||
|
||||
// Size bins; larger bins are allowed to go into smaller bins.
|
||||
// Since LARGE and MEDIUM are aligned (on word and byte boundaries respectively),
|
||||
// they are larger than OTHER even though those can contain very large objects (but we
|
||||
// don't want those in the MEDIUM or LARGE bins as these are variable size).
|
||||
// SMALL can only be in small (and NONE), so they cannot fragment the larger bins.
|
||||
typedef enum mi_bbin_e {
|
||||
MI_BBIN_NONE, // no bin assigned yet (the chunk is completely free)
|
||||
MI_BBIN_SMALL, // slice_count == 1
|
||||
MI_BBIN_OTHER, // slice_count: any other from the other bins, and 1 <= slice_count <= MI_BCHUNK_BITS
|
||||
MI_BBIN_MEDIUM, // slice_count == 8
|
||||
MI_BBIN_LARGE, // slice_count == MI_BFIELD_BITS
|
||||
MI_BBIN_OTHER, // slice_count > 1, and not 8 or MI_BFIELD_BITS
|
||||
MI_BBIN_COUNT
|
||||
} mi_bbin_t;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue