summaryrefslogtreecommitdiffstats
path: root/share/man/man9/zone.9
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2003-07-21 14:20:58 +0000
committerharti <harti@FreeBSD.org>2003-07-21 14:20:58 +0000
commit0914303fac7bcaf1a83b12ff3b58676e973eef1f (patch)
tree077cb6736357863317a9b173d5de78ef40499ce6 /share/man/man9/zone.9
parent41db0ba3ce4d862ca17d07d142d6ebfd4074d292 (diff)
downloadFreeBSD-src-0914303fac7bcaf1a83b12ff3b58676e973eef1f.zip
FreeBSD-src-0914303fac7bcaf1a83b12ff3b58676e973eef1f.tar.gz
Document uma_zone_set_max and its non-obvious behaviour.
Reviewed by: bmilekic
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 6c97465..0a085d6 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
OpenPOWER on IntegriCloud