sysctl for querying kmem_map->size
Andriy Gapon
avg at freebsd.org
Tue Oct 5 15:27:49 UTC 2010
on 30/09/2010 20:17 Andriy Gapon said the following:
>
> 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.
Here's an updated patch:
http://people.freebsd.org/~avg/sysctl-kmem_map_size2.diff
The new code wraps kmem_map->size into SYSCTL_PROC() to handle vm_size_t type
differences for different platforms. The idea is suggested by Ed Maste.
--
Andriy Gapon
More information about the freebsd-hackers
mailing list