| 72 | |
| 73 | #ifdef LODEPNG_COMPILE_ALLOCATORS |
| 74 | static 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 */ |
| 82 | static void* lodepng_realloc(void* ptr, size_t new_size) { |
no outgoing calls
no test coverage detected