diff options
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/utils.c b/src/utils.c index 7d9a872..d9361d6 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1,4 +1,4 @@ -/* $Id: utils.c,v 1.10 2001-09-08 18:55:58 rjkaes Exp $ +/* $Id: utils.c,v 1.11 2001-09-11 19:27:27 rjkaes Exp $ * * Misc. routines which are used by the various functions to handle strings * and memory allocation and pretty much anything else we can think of. Also, @@ -49,6 +49,13 @@ void *debugging_malloc(size_t size, const char *file, unsigned long line) return ptr; } +void *debugging_realloc(void *ptr, size_t size, const char *file, unsigned long line) +{ + void *newptr = realloc(ptr, size); + fprintf(stderr, "{realloc: %p -> %p:%u} %s:%lu\n", ptr, newptr, size, file, line); + return newptr; +} + void debugging_free(void *ptr, const char *file, unsigned long line) { fprintf(stderr, "{free: %p} %s:%lu\n", ptr, file, line); |