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

Function _mi_free_generic

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

Source from the content-addressed store, hash-verified

480
481
482void mi_decl_noinline _mi_free_generic(const mi_segment_t* segment, mi_page_t* page, bool is_local, void* p) mi_attr_noexcept {
483 mi_block_t* const block = (mi_page_has_aligned(page) ? _mi_page_ptr_unalign(segment, page, p) : (mi_block_t*)p);
484 mi_stat_free(page, block); // stat_free may access the padding
485 mi_track_free(p);
486 _mi_free_block(page, is_local, block);
487}
488
489// Get the segment data belonging to a pointer
490// This is just a single `and` in assembly but does further checks in debug mode

Callers 1

mi_checked_ptr_segmentFunction · 0.85

Calls 4

mi_page_has_alignedFunction · 0.85
_mi_page_ptr_unalignFunction · 0.85
mi_stat_freeFunction · 0.85
_mi_free_blockFunction · 0.85

Tested by

no test coverage detected