From 382682b2a4c79d66e2e504a99e60ef3bbc20fe4a Mon Sep 17 00:00:00 2001 From: Jeroen Ruigrok van der Werven Date: Sat, 18 May 2002 11:12:02 +0000 Subject: [PATCH] Add description for uma_zcreate(). Submitted by: arr --- share/man/man9/Makefile | 1 + share/man/man9/zone.9 | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index f819a9dccb9a..430f6c6043a3 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -391,6 +391,7 @@ MLINKS+=vcount.9 count_dev.9 MLINKS+=zone.9 uma.9 MLINKS+=zone.9 uma_zalloc.9 +MLINKS+=zone.9 uma_zcreate.9 MLINKS+=zone.9 uma_zfree.9 MLINKS+=zone.9 uma_zdestroy.9 diff --git a/share/man/man9/zone.9 b/share/man/man9/zone.9 index df23347ae905..f059eba3cef0 100644 --- a/share/man/man9/zone.9 +++ b/share/man/man9/zone.9 @@ -29,6 +29,7 @@ .Dt ZONE 9 .Os .Sh NAME +.Nm uma_zcreate , .Nm uma_zalloc , .Nm uma_zfree , .Nm uma_zdestroy @@ -37,6 +38,9 @@ .In sys/param.h .In sys/queue.h .In vm/uma.h +.Ft uma_zone_t +.Fn uma_zcreate "char *name" "int size" "uma_ctor ctor" "uma_dtor dtor" "uma_in +it uminit" "uma_fini fini" "int align" "u_int16_t flags" .Ft void * .Fn uma_zalloc "uma_zone_t zone, int flags" .Ft void @@ -77,6 +81,14 @@ it will have been cleared to zeroes, however subsequent allocations will retain the contents as of the last free, with the exception of the fields mentioned above. .Pp +The +.Fn uma_zcreate +function creates a new zone from which items may then be allocated from. +The +.Fa name +argument is a text name of the zone for debugging and stats; this memory +should not be freed until the zone has been deallocated. +.Pp To allocate an item from a zone, simply call .Fn uma_zalloc with a pointer to that zone