Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146362333
D45378.id139133.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D45378.id139133.diff
View Options
diff --git a/sys/vm/uma.h b/sys/vm/uma.h
--- a/sys/vm/uma.h
+++ b/sys/vm/uma.h
@@ -747,4 +747,19 @@
/* Return the amount of memory remaining. May be negative. */
long uma_avail(void);
+/*
+ * Return the zone name string given to uma_zcreate(9) or its variants.
+ *
+ * The name may duplicate with any other zones.
+ */
+const char * uma_zone_name(const uma_zone_t zone);
+
+/*
+ * Similar to uma_zone_name() except that this returns the zone name string
+ * unique to each zone.
+ *
+ * The returned name is used by sysctl(3) to distinguish each zone.
+ */
+const char * uma_zone_unique_name(const uma_zone_t zone);
+
#endif /* _VM_UMA_H_ */
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -5405,6 +5405,18 @@
return (uma_kmem_limit - uma_size());
}
+/* See uma.h */
+const char * uma_zone_name(const uma_zone_t zone)
+{
+ return (zone->uz_name);
+}
+
+/* See uma.h */
+const char * uma_zone_unique_name(const uma_zone_t zone)
+{
+ return (zone->uz_ctlname);
+}
+
#ifdef DDB
/*
* Generate statistics across both the zone and its per-cpu cache's. Return
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 3, 2:19 AM (7 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29178080
Default Alt Text
D45378.id139133.diff (1 KB)
Attached To
Mode
D45378: kern/vm: Publish the name strings of the uma(9) zone.
Attached
Detach File
Event Timeline
Log In to Comment