summaryrefslogtreecommitdiffstats
path: root/sys/vm/uma.h
diff options
context:
space:
mode:
authorlstewart <lstewart@FreeBSD.org>2010-10-16 04:14:45 +0000
committerlstewart <lstewart@FreeBSD.org>2010-10-16 04:14:45 +0000
commit2770ad22da37ff641831366d79c70e90f0c0c858 (patch)
tree60814622ef6a50dfe36a1c033e23281a8d0a66fa /sys/vm/uma.h
parent86cfb1d139775d0e932f69a5c2c6bc4b7269ec4b (diff)
downloadFreeBSD-src-2770ad22da37ff641831366d79c70e90f0c0c858.zip
FreeBSD-src-2770ad22da37ff641831366d79c70e90f0c0c858.tar.gz
- Simplify implementation of uma_zone_get_max.
- Add uma_zone_get_cur which returns the current approximate occupancy of a zone. This is useful for providing stats via sysctl amongst other things. Sponsored by: FreeBSD Foundation Reviewed by: gnn, jhb MFC after: 2 weeks
Diffstat (limited to 'sys/vm/uma.h')
-rw-r--r--sys/vm/uma.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/vm/uma.h b/sys/vm/uma.h
index f0522b0..6ab515e 100644
--- a/sys/vm/uma.h
+++ b/sys/vm/uma.h
@@ -471,6 +471,17 @@ void uma_zone_set_max(uma_zone_t zone, int nitems);
int uma_zone_get_max(uma_zone_t zone);
/*
+ * Obtains the approximate current number of items allocated from a zone
+ *
+ * Arguments:
+ * zone The zone to obtain the current allocation count from
+ *
+ * Return:
+ * int The approximate current number of items allocated from the zone
+ */
+int uma_zone_get_cur(uma_zone_t zone);
+
+/*
* The following two routines (uma_zone_set_init/fini)
* are used to set the backend init/fini pair which acts on an
* object as it becomes allocated and is placed in a slab within
OpenPOWER on IntegriCloud