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

Function mi_heap_try_new

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

Source from the content-addressed store, hash-verified

928#endif
929
930static mi_decl_noinline void* mi_heap_try_new(mi_heap_t* heap, size_t size, bool nothrow ) {
931 void* p = NULL;
932 while(p == NULL && mi_try_new_handler(nothrow)) {
933 p = mi_heap_malloc(heap,size);
934 }
935 return p;
936}
937
938static mi_decl_noinline void* mi_try_new(size_t size, bool nothrow) {
939 return mi_heap_try_new(mi_get_default_heap(), size, nothrow);

Callers 2

mi_try_newFunction · 0.85
mi_heap_alloc_newFunction · 0.85

Calls 2

mi_try_new_handlerFunction · 0.85
mi_heap_mallocFunction · 0.85

Tested by

no test coverage detected