sysctl for querying kmem_map->size

Andriy Gapon avg at icyb.net.ua
Thu Sep 30 17:17:54 UTC 2010


Here's a patch that adds a sysctl for querying kmem_map->size, which may be useful
for system state/resources monitoring:
http://people.freebsd.org/~avg/sysctl-kmem_map_size.diff

I am quite unsure about sizeof(kmem_map->size) == sizeof(int) hack, but I couldn't
think of other way to decide whether to use SYSCTL_ADD_UINT or SYSCTL_ADD_ULONG
depending on real type behind vm_size_t.

Comments, suggestions?

-- 
Andriy Gapon


More information about the freebsd-hackers mailing list