MCPcopy Create free account
hub / github.com/DFHack/dfhack / lodepng_malloc

Function lodepng_malloc

depends/lodepng/lodepng.cpp:74–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72
73#ifdef LODEPNG_COMPILE_ALLOCATORS
74static void* lodepng_malloc(size_t size) {
75#ifdef LODEPNG_MAX_ALLOC
76 if(size > LODEPNG_MAX_ALLOC) return 0;
77#endif
78 return malloc(size);
79}
80
81/* NOTE: when realloc returns NULL, it leaves the original memory untouched */
82static void* lodepng_realloc(void* ptr, size_t new_size) {

Callers 15

alloc_string_sizedFunction · 0.85
lodepng_load_fileFunction · 0.85
HuffmanTree_makeTableFunction · 0.85
bpmnode_sortFunction · 0.85
generateFixedLitLenTreeFunction · 0.85
getTreeInflateDynamicFunction · 0.85
hash_initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected