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

Function mi_new_reallocn

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

Source from the content-addressed store, hash-verified

1000}
1001
1002mi_decl_nodiscard void* mi_new_reallocn(void* p, size_t newcount, size_t size) {
1003 size_t total;
1004 if mi_unlikely(mi_count_size_overflow(newcount, size, &total)) {
1005 mi_try_new_handler(false); // on overflow we invoke the try_new_handler once to potentially throw std::bad_alloc
1006 return NULL;
1007 }
1008 else {
1009 return mi_new_realloc(p, total);
1010 }

Callers

nothing calls this directly

Calls 3

mi_unlikelyFunction · 0.85
mi_count_size_overflowFunction · 0.85
mi_try_new_handlerFunction · 0.85

Tested by

no test coverage detected