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

Function mi_malloc_size_checked

3rd/mimalloc-2.0.9/src/alloc-override.c:60–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 #define MI_OSX_IS_INTERPOSED
59
60 mi_decl_externc static size_t mi_malloc_size_checked(void *p) {
61 if (!mi_is_in_heap_region(p)) return 0;
62 return mi_usable_size(p);
63 }
64
65 // use interposing so `DYLD_INSERT_LIBRARIES` works without `DYLD_FORCE_FLAT_NAMESPACE=1`
66 // See: <https://books.google.com/books?id=K8vUkpOXhN4C&pg=PA73>

Callers

nothing calls this directly

Calls 2

mi_usable_sizeFunction · 0.85
mi_is_in_heap_regionFunction · 0.70

Tested by

no test coverage detected