summaryrefslogtreecommitdiff
path: root/share/man
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2000-06-06 20:33:19 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2000-06-06 20:33:19 +0000
commit84a96a53124e8202326f45f23335c43b8ff06f52 (patch)
tree9e91f9c360ab1f3e8f22b709b60aaea229338fdc /share/man
parent5173d0d2d46f86f6051e451b6326135215d3c5ff (diff)
Some minor corrections.
Diffstat (limited to 'share/man')
-rw-r--r--share/man/man9/malloc.929
1 files changed, 16 insertions, 13 deletions
diff --git a/share/man/man9/malloc.9 b/share/man/man9/malloc.9
index 966f08f7ddd..727aad4b154 100644
--- a/share/man/man9/malloc.9
+++ b/share/man/man9/malloc.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: malloc.9,v 1.9 2000/06/06 20:18:54 art Exp $
+.\" $OpenBSD: malloc.9,v 1.10 2000/06/06 20:33:18 aaron Exp $
.\" $NetBSD: malloc.9,v 1.2 1996/10/30 05:29:54 lukem Exp $
.\"
.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -110,7 +110,8 @@ The
.Fa type
argument broadly identifies the kernel subsystem for which the allocated
memory was needed, and is commonly used to maintain statistics about
-kernel memory usage. The following types are currently defined:
+kernel memory usage.
+The following types are currently defined:
.Pp
.Bl -tag -offset indent -width XXXXXXXXXXXXXX -compact
.It Dv M_FREE
@@ -350,8 +351,8 @@ such things as writing outside the allocated area and imbalanced calls to the
.Fn malloc
and
.Fn free
-functions. Failing consistency checks will cause a panic or a system console
-message:
+functions.
+Failing consistency checks will cause a panic or a system console message:
.Bl -bullet -offset indent -compact
.Pp
.It
@@ -388,10 +389,10 @@ panic:
.El
.Sh DEBUGGING
A kernel compiled with the
-.Dv MALLOC_DEBUG
+.Cm MALLOC_DEBUG
option allows for more extensive
-debugging of memory allocations. You can choose which allocation to debug
-with the
+debugging of memory allocations.
+You can choose which allocation to debug with the
.Va malloc_deb_type
and
.Va malloc_deb_size
@@ -405,10 +406,11 @@ wildcard.
Every call to
.Fn malloc
with a memory type and size that matches the debugged type and size will
-allocate two virtual pages. The pointer returned will be aligned so that
+allocate two virtual pages.
+The pointer returned will be aligned so that
the requested area will end at the page boundary and the second virtual page
-will be left unmapped. This way we can catch reads and writes outside the
-allocated area.
+will be left unmapped.
+This way we can catch reads and writes outside the allocated area.
.Pp
Every call to
.Fn free
@@ -416,11 +418,12 @@ with memory that was returned by the debugging malloc will cause the memory
area to become unmapped so that we can catch dangling reads and writes to
freed memory.
.Pp
-There are no special diagnotics if any errors are caught by the debugging
-malloc. The errors will look like normal access to unmapped 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.
.Pp
You have to be very careful when using the
-.Dv MALLOC_DEBUG
+.Cm MALLOC_DEBUG
option, the memory consumption can run away pretty quickly and there is
a severe performance degradation when allocating and freeing debugged memory
types.