From 36538c059e1d086b4a498e3ecb93314034bf1adb Mon Sep 17 00:00:00 2001 From: Artur Grabowski Date: Thu, 26 Jul 2001 14:23:32 +0000 Subject: Print "data modified on freelist" sizes in hex. I know at least of two cases where people got confused by this and used the wrong size to the malloc debugger. --- sys/kern/kern_malloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index d83bf62722d..68a943c5e23 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_malloc.c,v 1.35 2001/06/27 04:49:43 art Exp $ */ +/* $OpenBSD: kern_malloc.c,v 1.36 2001/07/26 14:23:31 art Exp $ */ /* $NetBSD: kern_malloc.c,v 1.15.4.2 1996/06/13 17:10:56 cgd Exp $ */ /* @@ -243,7 +243,7 @@ malloc(size, type, flags) vm_map_unlock(kmem_map); if (!rv) { - printf("%s %d of object %p size %ld %s %s (invalid addr %p)\n", + printf("%s %d of object %p size 0x%lx %s %s (invalid addr %p)\n", "Data modified on freelist: word", (int32_t *)&kbp->kb_next - (int32_t *)kbp, va, size, "previous type", savedtype, kbp->kb_next); @@ -268,7 +268,7 @@ malloc(size, type, flags) for (lp = (int32_t *)va; lp < end; lp++) { if (*lp == WEIRD_ADDR) continue; - printf("%s %d of object %p size %ld %s %s (0x%x != 0x%x)\n", + printf("%s %d of object %p size 0x%lx %s %s (0x%x != 0x%x)\n", "Data modified on freelist: word", lp - (int32_t *)va, va, size, "previous type", savedtype, *lp, WEIRD_ADDR); break; -- cgit v1.2.3