diff options
Diffstat (limited to 'libc/stdlib/malloc/alloc.c')
-rw-r--r-- | libc/stdlib/malloc/alloc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libc/stdlib/malloc/alloc.c b/libc/stdlib/malloc/alloc.c index 4988bb055..a521cf2e8 100644 --- a/libc/stdlib/malloc/alloc.c +++ b/libc/stdlib/malloc/alloc.c @@ -47,3 +47,14 @@ void free_dbg(void *ptr, char *function, char *file, int line) } #endif + +#ifdef L_realloc_dbg +void *realloc_dbg(void *ptr, size_t size, char *function, char *file, int line) +{ + fprintf(stderr, "realloc of %p to %ld bytes at %s @%s;%d = ", ptr, + size, function, file, line); + ptr = realloc(ptr, size); + fprintf(stderr, "%p\n", ptr); + return ptr; +} +#endif |