summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-01-04 06:14:38 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-01-04 06:14:38 +0000
commit6c2c99dbcac68e72a3b3489da1f9b2bb4c8ac554 (patch)
tree3f99290c169b6bea757cc6d3ac0d678c46205a09 /lib
parent3403bc8618547ee1a0c342f28768876dc996a0d7 (diff)
Document kern.malloc tree
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/sysctl.354
1 files changed, 53 insertions, 1 deletions
diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3
index bc37632c15b..13dfb97c3f6 100644
--- a/lib/libc/gen/sysctl.3
+++ b/lib/libc/gen/sysctl.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sysctl.3,v 1.59 2000/12/24 00:30:52 aaron Exp $
+.\" $OpenBSD: sysctl.3,v 1.60 2001/01/04 06:14:37 angelos Exp $
.\"
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
@@ -301,6 +301,7 @@ information.
.It Dv KERN_VDISABLE No " integer no"
.It Dv KERN_VERSION No " string no"
.It Dv KERN_VNODE No " struct vnode no"
+.It Dv KERN_MALLOCSTATS No " node not applicable"
.El
.Pp
.Bl -tag -width "123456"
@@ -403,6 +404,57 @@ The third and fourth level names are as follows:
.It Dv KERN_PROC_UID No " A user ID"
.It Dv KERN_PROC_RUID No " A real user ID"
.El
+.It Dv KERN_MALLOCSTATS
+Return kernel memory bucket statistics.
+The third level names are detailed below.
+There are no changeable values in this branch.
+.Bl -column "KERN_MALLOC_HIGH_WATERMARK" "string" -offset indent
+.It Sy Third level name Type
+.It Dv KERN_MALLOC_BUCKETS string
+.It Dv KERN_MALLOC_BUCKET node
+.El
+.Pp
+The variables are as follows:
+.Bl -tag -width "123456"
+.It Dv KERN_MALLOC_BUCKETS
+Return a comma-separated list of the bucket sizes used by the kernel.
+.It Dv KERN_MALLOC_BUCKET.<size>
+A node containing the statistics for the memory bucket of the
+specified size (in decimal notation, the number of bytes per bucket
+element, e.g., 16, 32, 128).
+The fifth level names are:
+.Bl -column "KERN_MALLOC_COULDFREEXXX" "quad" -offset indent
+.It Dv KERN_MALLOC_CALLS node
+.It Dv KERN_MALLOC_ALLOC node
+.It Dv KERN_MALLOC_FREE node
+.It Dv KERN_MALLOC_ELEMENTS node
+.It Dv KERN_MALLOC_HIWAT node
+.It Dv KERN_MALLOC_COULDFREE node
+.El
+.Pp
+The variables are as follows:
+.Bl -tag -width "123456"
+.It Dv KERN_MALLOC_CALLS
+Number of calls to the kernel allocator for this bucket size.
+.It Dv KERN_MALLOC_ALLOC
+Total number of blocks allocated from this bucket.
+.It Dv KERN_MALLOC_FREE
+Number of free elements on this bucket.
+.It Dv KERN_MALLOC_ELEMENTS
+Number of elements of this bucket size per memory cluster (the latter is
+usually defined as CLSIZE*NBPG).
+.It Dv KERN_MALLOC_HIWAT
+High watermark for this bucket size.
+.It Dv KERN_MALLOC_COULDFREE
+Number of times free elements exceeded high watermark.
+.El
+.Pp
+Note that bucket sizes are typically powers of 2.
+If a value is specified that does not correspond directly to a
+bucket size, the statistics for the closest larger bucket size will be
+displayed instead.
+.El
+.Pp
.It Dv KERN_PROF
Return profiling information about the kernel.
If the kernel is not compiled for profiling,