MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / mi_heap_page_queue_of

Function mi_heap_page_queue_of

3rd/mimalloc-2.0.9/src/page-queue.c:150–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150static mi_page_queue_t* mi_heap_page_queue_of(mi_heap_t* heap, const mi_page_t* page) {
151 uint8_t bin = (mi_page_is_in_full(page) ? MI_BIN_FULL : mi_bin(page->xblock_size));
152 mi_assert_internal(bin <= MI_BIN_FULL);
153 mi_page_queue_t* pq = &heap->pages[bin];
154 mi_assert_internal(mi_page_is_in_full(page) || page->xblock_size == pq->block_size);
155 return pq;
156}
157
158// The current small page array is for efficiency and for each
159// small size (up to 256) it points directly to the page for that

Callers 1

_mi_page_unfullFunction · 0.85

Calls 2

mi_page_is_in_fullFunction · 0.85
mi_binFunction · 0.85

Tested by

no test coverage detected