diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-07-26 14:23:32 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-07-26 14:23:32 +0000 |
commit | 36538c059e1d086b4a498e3ecb93314034bf1adb (patch) | |
tree | 1a352a2fadbfe1384bd990ca8c51234c3d27207d | |
parent | d39cc45747773d7e99e5695d3b320e9bc366b094 (diff) |
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.
-rw-r--r-- | sys/kern/kern_malloc.c | 6 |
1 files 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; |