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

Function _mi_page_unfull

3rd/mimalloc-2.0.9/src/page.c:337–349  ·  view source on GitHub ↗

Move a page from the full list back to a regular list

Source from the content-addressed store, hash-verified

335
336// Move a page from the full list back to a regular list
337void _mi_page_unfull(mi_page_t* page) {
338 mi_assert_internal(page != NULL);
339 mi_assert_expensive(_mi_page_is_valid(page));
340 mi_assert_internal(mi_page_is_in_full(page));
341 if (!mi_page_is_in_full(page)) return;
342
343 mi_heap_t* heap = mi_page_heap(page);
344 mi_page_queue_t* pqfull = &heap->pages[MI_BIN_FULL];
345 mi_page_set_in_full(page, false); // to get the right queue
346 mi_page_queue_t* pq = mi_heap_page_queue_of(heap, page);
347 mi_page_set_in_full(page, true);
348 mi_page_queue_enqueue_from(pq, pqfull, page);
349}
350
351static void mi_page_to_full(mi_page_t* page, mi_page_queue_t* pq) {
352 mi_assert_internal(pq == mi_page_queue_of(page));

Callers 1

mi_unlikelyFunction · 0.85

Calls 6

_mi_page_is_validFunction · 0.85
mi_page_is_in_fullFunction · 0.85
mi_page_heapFunction · 0.85
mi_page_set_in_fullFunction · 0.85
mi_heap_page_queue_ofFunction · 0.85

Tested by

no test coverage detected