diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/heap.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -38,8 +38,8 @@ void *debugging_calloc (size_t nmemb, size_t size, const char *file, assert (size > 0); ptr = calloc (nmemb, size); - fprintf (stderr, "{calloc: %p:%zu x %zu} %s:%lu\n", ptr, nmemb, size, - file, line); + fprintf (stderr, "{calloc: %p:%lu x %lu} %s:%lu\n", ptr, + (unsigned long) nmemb, (unsigned long) size, file, line); return ptr; } @@ -50,7 +50,8 @@ void *debugging_malloc (size_t size, const char *file, unsigned long line) assert (size > 0); ptr = malloc (size); - fprintf (stderr, "{malloc: %p:%zu} %s:%lu\n", ptr, size, file, line); + fprintf (stderr, "{malloc: %p:%lu} %s:%lu\n", ptr, + (unsigned long) size, file, line); return ptr; } @@ -62,8 +63,8 @@ void *debugging_realloc (void *ptr, size_t size, const char *file, assert (size > 0); newptr = realloc (ptr, size); - fprintf (stderr, "{realloc: %p -> %p:%zu} %s:%lu\n", ptr, newptr, size, - file, line); + fprintf (stderr, "{realloc: %p -> %p:%lu} %s:%lu\n", ptr, newptr, + (unsigned long) size, file, line); return newptr; } @@ -89,7 +90,8 @@ char *debugging_strdup (const char *s, const char *file, unsigned long line) return NULL; memcpy (ptr, s, len); - fprintf (stderr, "{strdup: %p:%zu} %s:%lu\n", ptr, len, file, line); + fprintf (stderr, "{strdup: %p:%lu} %s:%lu\n", ptr, + (unsigned long) len, file, line); return ptr; } |