summaryrefslogtreecommitdiff
path: root/share/man/man9/malloc.9
diff options
context:
space:
mode:
Diffstat (limited to 'share/man/man9/malloc.9')
-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