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

Function mi_slice_first

3rd/mimalloc-2.0.9/include/mimalloc-internal.h:488–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486}
487
488static inline mi_slice_t* mi_slice_first(const mi_slice_t* slice) {
489 mi_slice_t* start = (mi_slice_t*)((uint8_t*)slice - slice->slice_offset);
490 mi_assert_internal(start >= _mi_ptr_segment(slice)->slices);
491 mi_assert_internal(start->slice_offset == 0);
492 mi_assert_internal(start + start->slice_count > slice);
493 return start;
494}
495
496// Get the page containing the pointer (performance critical as it is called in mi_free)
497static inline mi_page_t* _mi_segment_page_of(const mi_segment_t* segment, const void* p) {

Callers 2

_mi_segment_page_ofFunction · 0.85

Calls 1

_mi_ptr_segmentFunction · 0.85

Tested by

no test coverage detected