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

Function mi_page_queue_of

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

Source from the content-addressed store, hash-verified

138#endif
139
140static mi_page_queue_t* mi_page_queue_of(const mi_page_t* page) {
141 uint8_t bin = (mi_page_is_in_full(page) ? MI_BIN_FULL : mi_bin(page->xblock_size));
142 mi_heap_t* heap = mi_page_heap(page);
143 mi_assert_internal(heap != NULL && bin <= MI_BIN_FULL);
144 mi_page_queue_t* pq = &heap->pages[bin];
145 mi_assert_internal(bin >= MI_BIN_HUGE || page->xblock_size == pq->block_size);
146 mi_assert_expensive(mi_page_queue_contains(pq, page));
147 return pq;
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));

Callers 5

_mi_page_is_validFunction · 0.85
mi_page_to_fullFunction · 0.85
_mi_page_abandonFunction · 0.85
_mi_page_freeFunction · 0.85
_mi_page_retireFunction · 0.85

Calls 4

mi_page_is_in_fullFunction · 0.85
mi_binFunction · 0.85
mi_page_heapFunction · 0.85
mi_page_queue_containsFunction · 0.85

Tested by

no test coverage detected