NetBSD/current needs uvm/uvm_extern.h
This commit is contained in:
parent
1266ce3f22
commit
d917d356f5
2 changed files with 18 additions and 15 deletions
|
@ -1,10 +1,10 @@
|
|||
$NetBSD: distinfo,v 1.25 2012/09/15 09:03:50 cheusov Exp $
|
||||
$NetBSD: distinfo,v 1.26 2013/01/11 23:33:35 joerg Exp $
|
||||
|
||||
SHA1 (xosview-1.8.3.tar.gz) = 420fd0620ff9fb9ba83fc833eeb8b872414e377e
|
||||
RMD160 (xosview-1.8.3.tar.gz) = 595e812dee686ccaa5d95eb537782679d752271b
|
||||
Size (xosview-1.8.3.tar.gz) = 259793 bytes
|
||||
SHA1 (patch-aa) = 4a618b50e5c852b454db84019e7fa281c4b67337
|
||||
SHA1 (patch-ab) = 274b83fd3488af8e0c4ce0184b8c78f4f6ef87df
|
||||
SHA1 (patch-ab) = 2bc4ca0772c931dc208edb99158e7f7ae7261b3b
|
||||
SHA1 (patch-ac) = 3e9073c4ccd7e08d29a76b08f2ed0c7f9f9d9ede
|
||||
SHA1 (patch-ad) = 02ae8395e200e5cbf8d6339eced33fe5aa421d38
|
||||
SHA1 (patch-ae) = 6ff69eeffd40ec4ee3686f2069fd46853f346fff
|
||||
|
|
|
@ -1,19 +1,24 @@
|
|||
$NetBSD: patch-ab,v 1.12 2006/10/28 02:15:12 christos Exp $
|
||||
$NetBSD: patch-ab,v 1.13 2013/01/11 23:33:36 joerg Exp $
|
||||
|
||||
--- bsd/memmeter.cc.orig 2002-07-13 23:48:45.000000000 -0400
|
||||
+++ bsd/memmeter.cc 2006-10-27 22:09:54.000000000 -0400
|
||||
@@ -77,7 +77,7 @@
|
||||
struct vmtotal meminfo;
|
||||
int params[] = {CTL_VM, VM_METER};
|
||||
--- bsd/memmeter.cc.orig 2002-07-14 03:48:45.000000000 +0000
|
||||
+++ bsd/memmeter.cc
|
||||
@@ -26,6 +26,8 @@
|
||||
#include <sys/sysctl.h> /* Needed for kvm_cnt, kvm_uvm_exp. */
|
||||
-#if defined(XOSVIEW_BSDI) || defined(XOSVIEW_FREEBSD) || defined(XOSVIEW_OPENBSD) /* Does
|
||||
- OpenBSD need this? */
|
||||
+#if defined(XOSVIEW_BSDI) || defined(XOSVIEW_FREEBSD) || defined(XOSVIEW_OPENBSD)
|
||||
# include <sys/vmmeter.h>
|
||||
#endif
|
||||
+#if defined(__NetBSD__)
|
||||
+#include <uvm/uvm_extern.h>
|
||||
+#endif
|
||||
|
||||
@@ -79,3 +81,3 @@ void MemMeter::getmeminfo (void) {
|
||||
size_t meminfosize = sizeof (struct vmtotal);
|
||||
- sysctl (params, 2, &meminfo, &meminfosize, NULL, NULL);
|
||||
+ sysctl (params, 2, &meminfo, &meminfosize, NULL, 0);
|
||||
/* Note that the numbers are in terms of 4K pages. */
|
||||
|
||||
total_ = 4096*(meminfo.t_free+meminfo.t_rm);
|
||||
@@ -91,8 +91,15 @@
|
||||
* this, and later we'll add all the common fields to this. */
|
||||
total_ = 0.0;
|
||||
@@ -93,4 +95,11 @@ void MemMeter::getmeminfo (void) {
|
||||
#if defined(UVM) && (defined(XOSVIEW_NETBSD) || defined(XOSVIEW_OPENBSD))
|
||||
+#ifdef VM_UVMEXP2
|
||||
+ int params[] = {CTL_VM, VM_UVMEXP2};
|
||||
|
@ -25,5 +30,3 @@ $NetBSD: patch-ab,v 1.12 2006/10/28 02:15:12 christos Exp $
|
|||
BSDGetUVMPageStats(&kvm_uvm_exp);
|
||||
+#endif
|
||||
int pgsize = kvm_uvm_exp.pagesize;
|
||||
fields_[0] = kvm_uvm_exp.active*pgsize;
|
||||
fields_[1] = kvm_uvm_exp.inactive*pgsize;
|
||||
|
|
Loading…
Reference in a new issue