summaryrefslogtreecommitdiff
path: root/share/man/man9
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2008-12-11 09:07:17 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2008-12-11 09:07:17 +0000
commit34c38d681315d5162c7d3e9106f903d5d9a9b732 (patch)
tree6c05d0bd94059695c2a8d971bf5c9fdef3782a9e /share/man/man9
parentef85ec3c324fe918d845ce929eaf328412b3ff6c (diff)
- update the list of types
- some text improvements - remember systat(1) ok otto
Diffstat (limited to 'share/man/man9')
-rw-r--r--share/man/man9/malloc.946
1 files changed, 25 insertions, 21 deletions
diff --git a/share/man/man9/malloc.9 b/share/man/man9/malloc.9
index b217e5a9c4d..97b7b9a15b0 100644
--- a/share/man/man9/malloc.9
+++ b/share/man/man9/malloc.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: malloc.9,v 1.42 2008/09/02 21:42:05 chl Exp $
+.\" $OpenBSD: malloc.9,v 1.43 2008/12/11 09:07:16 jmc Exp $
.\" $NetBSD: malloc.9,v 1.2 1996/10/30 05:29:54 lukem Exp $
.\"
.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: September 2 2008 $
+.Dd $Mdocdate: December 11 2008 $
.Dt MALLOC 9
.Os
.Sh NAME
@@ -55,13 +55,9 @@ that was previously allocated by
.Fn malloc
for re-use.
.Pp
-Unlike its standard C library counterpart
-.Pq Xr malloc 3 ,
-the kernel version takes two more arguments.
The
.Fa flags
-argument further qualifies
-.Fn malloc Ns 's
+argument further qualifies malloc's
operational characteristics as follows:
.Bl -tag -width xxx -offset indent
.It Dv M_WAITOK
@@ -101,6 +97,17 @@ The
argument broadly identifies the kernel subsystem for which the allocated
memory was needed, and is commonly used to maintain statistics about
kernel memory usage.
+These statistics can be examined using
+.Xr vmstat 8
+or
+.Xr systat 1
+if either of the kernel
+.Xr options 4
+.Cm KMEMSTATS
+or
+.Cm DEBUG
+are enabled.
+.Pp
The following types are currently defined:
.Pp
.Bl -tag -offset indent -width XXXXXXXXXXXXXX -compact
@@ -153,6 +160,8 @@ VM map structures.
SVID compatible semaphores.
.It Dv M_DIRHASH
UFS directory hash structures.
+.It Dv M_ACPI
+ACPI structures.
.It Dv M_VMPMAP
VM pmap data.
.It Dv M_FILE
@@ -198,7 +207,7 @@ Allocated tty structures.
.It Dv M_EXEC
Argument lists & other mem used by exec.
.It Dv M_MISCFSMNT
-Misc. FS mount structures.
+Miscellaneous FS mount structures.
.It Dv M_PFKEY
Pfkey data.
.It Dv M_TDB
@@ -279,20 +288,14 @@ UDF mount structures.
.It Dv M_UDFFENTRY
UDF file entries.
.It Dv M_UDFFID
-UDF file ids.
+UDF file ID.
+.It Dv M_BTHIDEV
+Bluetooth HID.
+.It Dv M_AGP
+AGP memory.
+.It Dv M_DRM
+Direct Rendering Manager.
.El
-.Pp
-Statistics based on the
-.Fa type
-argument are maintained only if the kernel option
-.Dv KMEMSTATS
-is used when compiling the kernel
-.Po the default in current\ \&
-.Ox
-kernels
-.Pc
-and can be examined by using
-.Sq vmstat -m .
.Sh RETURN VALUES
.Fn malloc
returns a kernel virtual address that is suitably aligned for storage of
@@ -403,4 +406,5 @@ option: the memory consumption can run away pretty quickly and there is
a severe performance degradation when allocating and freeing debugged memory
types.
.Sh SEE ALSO
+.Xr systat 1 ,
.Xr vmstat 8