KVM_KMEM(3) BSD Programmer's Manual KVM_KMEM(3)NAME
kvm_kmem, kvm_kmemsize - kernel clock and statistics
SYNOPSIS
#include <sys/param.h>
#include <sys/malloc.h>
#include <sys/sysctl.h>
#include <kvm.h>
#include <kvm_stat.h>
int
kvm_kmem(kvm_t *kd, struct kmembuckets *bp, int nb, struct kmemstats *sp,
int ns);
int
kvm_kmemsize(kvm_t *kd, int *nbp, int *nsp);
DESCRIPTION
The kvm_kmem() function fills in the memory referenced by bp with an ar-
ray of up to nb struct kmembuckets structures and the memory referenced
by sp with an array of up to ns struct kmemstats structures from the ker-
nel indicated by kd. These structures describe kernel memory in use and
usage statistics, respectively.
The kvm_kmemsize() function provides required size of the above arrays in
the variables referenced by nbp and nsp respectively.
RETURN VALUES
These routines return zero on success and -1 on failure. Upon failure
kvm_geterr(3) can be used to obtain a string describing the error.
SEE ALSOkvm(3), kvm_open(3), kvm_openfiles(3), kvm_close(3), kvm_read(3),
kvm_write(3), kvm_nlist(3), kvm_geterr(3)BSDI BSD/OS May 7, 1997 1