aboutsummaryrefslogtreecommitdiff
path: root/share/man/man9/zone.9
diff options
context:
space:
mode:
authorHartmut Brandt <harti@FreeBSD.org>2003-07-21 14:20:58 +0000
committerHartmut Brandt <harti@FreeBSD.org>2003-07-21 14:20:58 +0000
commitd7bbb21a9d12353342bf6f54250cb842d9141e50 (patch)
tree077cb6736357863317a9b173d5de78ef40499ce6 /share/man/man9/zone.9
parent58aa55efa516dc7613f7bf72dfc718a967e298e5 (diff)
Document uma_zone_set_max and its non-obvious behaviour.
Reviewed by: bmilekic
Notes
Notes: svn path=/head/; revision=117836
Diffstat (limited to 'share/man/man9/zone.9')
-rw-r--r--share/man/man9/zone.923
1 files changed, 21 insertions, 2 deletions
diff --git a/share/man/man9/zone.9 b/share/man/man9/zone.9
index 6c9746557355..0a085d6a68b1 100644
--- a/share/man/man9/zone.9
+++ b/share/man/man9/zone.9
@@ -25,14 +25,15 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 18, 2002
+.Dd July 21, 2003
.Dt ZONE 9
.Os
.Sh NAME
.Nm uma_zcreate ,
.Nm uma_zalloc ,
.Nm uma_zfree ,
-.Nm uma_zdestroy
+.Nm uma_zdestroy ,
+.Nm uma_zone_set_max
.Nd zone allocator
.Sh SYNOPSIS
.In sys/param.h
@@ -50,6 +51,8 @@
.Fn uma_zfree "uma_zone_t zone" "void *item"
.Ft void
.Fn uma_zdestroy "uma_zone_t zone"
+.Ft void
+.Fn uma_zone_set_max "uma_zone_t zone" "int nitems"
.Sh DESCRIPTION
The zone allocator provides an efficient interface for managing
dynamically-sized collections of items of similar size.
@@ -167,6 +170,22 @@ All items allocated from the zone with
must have been freed with
.Fn uma_zfree
before.
+.Pp
+The purpose of
+.Fn uma_zone_set_max
+is to limit the maximum amount of memory that the system can dedicated
+toward the zone specified by the
+.Fa zone
+argument.
+The
+.Fa nitems
+argument gives the upper limit of items in the zone.
+This limits the total number of items in the zone which includes:
+allocated items, free items and free items in the per-cpu caches.
+On systems with more than one CPU it may not be possible to allocate
+the specified number of items even when there is no shortage of memory,
+because all of the remaining free items may be in the caches of the
+other CPUs when the limit is hit.
.Sh RETURN VALUES
The
.Fn uma_zalloc