|
|
|
|
|
|
|
|
printf("################################################\n"); |
|
|
printf("################################################\n"); |
|
|
printf("\n"); |
|
|
printf("\n"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#ifdef LC6_DEBUG |
|
|
|
|
|
|
|
|
|
|
|
void* lc6helpers_malloc(size_t size, char *file, const char *func, int line) { |
|
|
|
|
|
printf("[%s:%d] %s called malloc(%lu)\n", file, line, func, size); |
|
|
|
|
|
return malloc(size); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void* lc6helpers_realloc(void *ptr, size_t size, char *file, const char *func, int line) { |
|
|
|
|
|
printf("[%s:%d] %s called realloc(%p, %lu)\n", file, line, func, ptr, size); |
|
|
|
|
|
return realloc(ptr, size); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void lc6helpers_free(void *ptr, char *file, const char *func, int line) { |
|
|
|
|
|
printf("[%s:%d] %s called free(%p)\n", file, line, func, ptr); |
|
|
|
|
|
free(ptr); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#endif |
|
|
|