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

Function mi_slices_start_iterate

3rd/mimalloc-2.0.9/src/segment.c:1270–1276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1268----------------------------------------------------------- */
1269
1270static mi_slice_t* mi_slices_start_iterate(mi_segment_t* segment, const mi_slice_t** end) {
1271 mi_slice_t* slice = &segment->slices[0];
1272 *end = mi_segment_slices_end(segment);
1273 mi_assert_internal(slice->slice_count>0 && slice->xblock_size>0); // segment allocated page
1274 slice = slice + slice->slice_count; // skip the first segment allocated page
1275 return slice;
1276}
1277
1278// Possibly free pages and check if free space is available
1279static bool mi_segment_check_free(mi_segment_t* segment, size_t slices_needed, size_t block_size, mi_segments_tld_t* tld)

Callers 2

mi_segment_check_freeFunction · 0.85
mi_segment_reclaimFunction · 0.85

Calls 1

mi_segment_slices_endFunction · 0.85

Tested by

no test coverage detected