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

Function realloc

test/core/test_wrap_malloc.c:23–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23void *realloc(void* ptr, size_t size) {
24 ++totalReallocs;
25 ptr = emscripten_builtin_realloc(ptr, size);
26 emscripten_console_logf("Reallocated %zu bytes, got %p. %d pointers re-allocated total.", size, ptr, totalReallocs);
27 return ptr;
28}
29
30void free(void *ptr) {
31 ++totalFrees;

Callers 7

test_reallocFunction · 0.70
randomsFunction · 0.70
mainFunction · 0.70
get_module_pathFunction · 0.50
launcher_mainFunction · 0.50
randomsFunction · 0.50
makeLongStrFunction · 0.50

Calls 1

emscripten_console_logfFunction · 0.85

Tested by

no test coverage detected