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

Function mi_list_contains

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

linear check if the free list contains a specific element

Source from the content-addressed store, hash-verified

179#if (MI_ENCODE_FREELIST && (MI_SECURE>=4 || MI_DEBUG!=0))
180// linear check if the free list contains a specific element
181static bool mi_list_contains(const mi_page_t* page, const mi_block_t* list, const mi_block_t* elem) {
182 while (list != NULL) {
183 if (elem==list) return true;
184 list = mi_block_next(page, list);
185 }
186 return false;
187}
188
189static mi_decl_noinline bool mi_check_is_double_freex(const mi_page_t* page, const mi_block_t* block) {
190 // The decoded value is in the same page (or NULL).

Callers 1

mi_check_is_double_freexFunction · 0.85

Calls 1

mi_block_nextFunction · 0.85

Tested by

no test coverage detected