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 _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"