From afe46c849b0983c8debd0446e0eb39ea503334c0 Mon Sep 17 00:00:00 2001 From: Patrick Caulfield Date: Fri, 16 Nov 2001 11:37:45 +0000 Subject: [PATCH] size_ts aren't really pointers but there are no format specifiers for them, so this will just have to do. --- lib/mm/dbg_malloc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/mm/dbg_malloc.c b/lib/mm/dbg_malloc.c index a186d06e6..a279ed43b 100644 --- a/lib/mm/dbg_malloc.c +++ b/lib/mm/dbg_malloc.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "dbg_malloc.h" #include "log.h" @@ -36,7 +37,7 @@ void *malloc_aux(size_t s, const char *file, int line) size_t tsize = s + sizeof(*nb) + sizeof(unsigned long); if (!(nb = malloc(tsize))) { - log_error("couldn't allocate any memory, size = %lu", s); + log_error("couldn't allocate any memory, size = %" PRIuPTR, s); return 0; } @@ -159,7 +160,7 @@ int dump_memory(void) for (mb = _head; mb; mb = mb->next) { print_log(_LOG_INFO, mb->file, mb->line, - "block %d at %p, size %ld", + "block %d at %p, size %" PRIdPTR, mb->id, mb->magic, mb->length); tot += mb->length; }