MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / mi_theap_reallocf

Function mi_theap_reallocf

system/lib/mimalloc/src/alloc.c:419–423  ·  view source on GitHub ↗

Reallocate but free `p` on errors

Source from the content-addressed store, hash-verified

417
418// Reallocate but free `p` on errors
419static void* mi_theap_reallocf(mi_theap_t* theap, void* p, size_t newsize) mi_attr_noexcept {
420 void* newp = mi_theap_realloc(theap, p, newsize);
421 if (newp==NULL && p!=NULL) mi_free(p);
422 return newp;
423}
424
425static void* mi_theap_rezalloc(mi_theap_t* theap, void* p, size_t newsize) mi_attr_noexcept {
426 return _mi_theap_realloc_zero(theap, p, newsize, true, NULL, NULL);

Callers 2

mi_reallocfFunction · 0.85
mi_heap_reallocfFunction · 0.85

Calls 2

mi_theap_reallocFunction · 0.85
mi_freeFunction · 0.85

Tested by

no test coverage detected