summaryrefslogtreecommitdiff
path: root/share/man/man9
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2000-06-07 10:02:57 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2000-06-07 10:02:57 +0000
commitd5c249313af9993f2ab7eab93a410fbd8d3422d9 (patch)
tree6216bdb7286ffb22352f4e51a05dd828e27260e9 /share/man/man9
parent6f5e9cf66ec3f2d19dc374be06a47ab690f4e71d (diff)
Document how 'show malloc' in ddb can be used to find out what went wrong.
Diffstat (limited to 'share/man/man9')
-rw-r--r--share/man/man9/malloc.911
1 files changed, 10 insertions, 1 deletions
diff --git a/share/man/man9/malloc.9 b/share/man/man9/malloc.9
index 727aad4b154..95cf3755631 100644
--- a/share/man/man9/malloc.9
+++ b/share/man/man9/malloc.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: malloc.9,v 1.10 2000/06/06 20:33:18 aaron Exp $
+.\" $OpenBSD: malloc.9,v 1.11 2000/06/07 10:02:56 art Exp $
.\" $NetBSD: malloc.9,v 1.2 1996/10/30 05:29:54 lukem Exp $
.\"
.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -421,6 +421,15 @@ freed memory.
There are no special diagnostics if any errors are caught by the debugging
malloc.
The errors will look like normal access to unmapped memory.
+When you get a memory access error, you can invoke the
+.Ic show malloc
+command in
+.Xr ddb 4
+to see what memory areas are allocated and freed.
+If the faulting address is within two pages from an address on the allocated
+list, you have gotten an access outside the allocated area.
+If the faulting address is within two pages from an address on the free list,
+you have gotten an access to freed memory.
.Pp
You have to be very careful when using the
.Cm MALLOC_DEBUG