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

Function mi_stat_huge_free

3rd/mimalloc-2.0.9/src/alloc.c:353–362  ·  view source on GitHub ↗

maintain stats for huge objects

Source from the content-addressed store, hash-verified

351#if (MI_STAT>0)
352// maintain stats for huge objects
353static void mi_stat_huge_free(const mi_page_t* page) {
354 mi_heap_t* const heap = mi_heap_get_default();
355 const size_t bsize = mi_page_block_size(page); // to match stats in `page.c:mi_page_huge_alloc`
356 if (bsize <= MI_LARGE_OBJ_SIZE_MAX) {
357 mi_heap_stat_decrease(heap, large, bsize);
358 }
359 else {
360 mi_heap_stat_decrease(heap, huge, bsize);
361 }
362}
363#else
364static void mi_stat_huge_free(const mi_page_t* page) {
365 MI_UNUSED(page);

Callers 1

_mi_free_block_mtFunction · 0.85

Calls 2

mi_heap_get_defaultFunction · 0.85
mi_page_block_sizeFunction · 0.85

Tested by

no test coverage detected