You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: include/mimalloc/types.h
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -307,6 +307,7 @@ typedef struct mi_page_s {
307
307
mi_block_t*local_free; // list of deferred free blocks by this thread (migrates to `free`)
308
308
uint16_tused; // number of blocks in use (including blocks in `thread_free`)
309
309
uint8_tblock_size_shift; // if not zero, then `(1 << block_size_shift) == block_size` (only used for fast path in `free.c:_mi_page_ptr_unalign`)
310
+
uint8_theap_tag; // tag of the owning heap, used for separated heaps by object type
310
311
// padding
311
312
size_tblock_size; // size available in each block (always `>0`)
312
313
uint8_t*page_start; // start of the page area containing the blocks
@@ -481,6 +482,7 @@ struct mi_heap_s {
481
482
size_tpage_retired_max; // largest retired index into the `pages` array.
482
483
mi_heap_t*next; // list of heaps per thread
483
484
boolno_reclaim; // `true` if this heap should not reclaim abandoned pages
485
+
uint8_ttag; // custom tag, can be used for separating heaps based on the object types
484
486
mi_page_t*pages_free_direct[MI_PAGES_DIRECT]; // optimize: array where every entry points a page with possibly free blocks in the corresponding queue for that size.
485
487
mi_page_queue_tpages[MI_BIN_FULL+1]; // queue of pages for each size class (or "bin")
0 commit comments