1 $NetBSD: patch-ab,v 1.12 2006/10/28 02:15:12 christos Exp $
3 --- bsd/memmeter.cc.orig 2002-07-13 23:48:45.000000000 -0400
4 +++ bsd/memmeter.cc 2006-10-27 22:09:54.000000000 -0400
6 struct vmtotal meminfo;
7 int params[] = {CTL_VM, VM_METER};
8 size_t meminfosize = sizeof (struct vmtotal);
9 - sysctl (params, 2, &meminfo, &meminfosize, NULL, NULL);
10 + sysctl (params, 2, &meminfo, &meminfosize, NULL, 0);
11 /* Note that the numbers are in terms of 4K pages. */
13 total_ = 4096*(meminfo.t_free+meminfo.t_rm);
15 * this, and later we'll add all the common fields to this. */
17 #if defined(UVM) && (defined(XOSVIEW_NETBSD) || defined(XOSVIEW_OPENBSD))
19 + int params[] = {CTL_VM, VM_UVMEXP2};
20 + struct uvmexp_sysctl kvm_uvm_exp;
21 + size_t kvm_uvm_exp_size = sizeof (kvm_uvm_exp);
22 + sysctl (params, 2, &kvm_uvm_exp, &kvm_uvm_exp_size, NULL, 0);
24 struct uvmexp kvm_uvm_exp;
25 BSDGetUVMPageStats(&kvm_uvm_exp);
27 int pgsize = kvm_uvm_exp.pagesize;
28 fields_[0] = kvm_uvm_exp.active*pgsize;
29 fields_[1] = kvm_uvm_exp.inactive*pgsize;