vm/param.h is gone
This commit is contained in:
parent
aff0d73571
commit
eb6b0c229a
@ -1,16 +1,20 @@
|
||||
$OpenBSD: patch-sysdeps_freebsd_mem.c,v 1.2 2001/09/19 14:37:49 naddy Exp $
|
||||
$OpenBSD: patch-sysdeps_freebsd_mem.c,v 1.3 2001/11/10 13:44:17 espie Exp $
|
||||
--- sysdeps/freebsd/mem.c.orig Sun Feb 13 16:47:58 2000
|
||||
+++ sysdeps/freebsd/mem.c Mon Aug 27 17:02:38 2001
|
||||
@@ -31,7 +31,7 @@
|
||||
+++ sysdeps/freebsd/mem.c Sat Nov 10 14:32:55 2001
|
||||
@@ -29,9 +29,11 @@
|
||||
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/vmmeter.h>
|
||||
+#ifndef __OpenBSD__
|
||||
#include <vm/vm_param.h>
|
||||
+#endif
|
||||
|
||||
-#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
|
||||
+#if (defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)) || defined(OpenBSD)
|
||||
#include <uvm/uvm_extern.h>
|
||||
#endif
|
||||
|
||||
@@ -57,7 +57,7 @@ static int pageshift; /* log base 2 of
|
||||
@@ -57,7 +59,7 @@ static int pageshift; /* log base 2 of
|
||||
|
||||
/* nlist structure for kernel access */
|
||||
static struct nlist nlst [] = {
|
||||
@ -19,7 +23,7 @@ $OpenBSD: patch-sysdeps_freebsd_mem.c,v 1.2 2001/09/19 14:37:49 naddy Exp $
|
||||
{ "_bufpages" },
|
||||
{ 0 }
|
||||
#else
|
||||
@@ -81,7 +81,7 @@ static int mib [] = { CTL_VM, VM_TOTAL }
|
||||
@@ -81,7 +83,7 @@ static int mib [] = { CTL_VM, VM_TOTAL }
|
||||
static int mib [] = { CTL_VM, VM_METER };
|
||||
#endif
|
||||
|
||||
@ -28,7 +32,7 @@ $OpenBSD: patch-sysdeps_freebsd_mem.c,v 1.2 2001/09/19 14:37:49 naddy Exp $
|
||||
static int mib_uvmexp [] = { CTL_VM, VM_UVMEXP };
|
||||
#endif
|
||||
|
||||
@@ -117,7 +117,7 @@ glibtop_get_mem_p (glibtop *server, glib
|
||||
@@ -117,7 +119,7 @@ glibtop_get_mem_p (glibtop *server, glib
|
||||
{
|
||||
struct vmtotal vmt;
|
||||
size_t length_vmt;
|
||||
@ -37,7 +41,7 @@ $OpenBSD: patch-sysdeps_freebsd_mem.c,v 1.2 2001/09/19 14:37:49 naddy Exp $
|
||||
struct uvmexp uvmexp;
|
||||
size_t length_uvmexp;
|
||||
#else
|
||||
@@ -146,7 +146,7 @@ glibtop_get_mem_p (glibtop *server, glib
|
||||
@@ -146,7 +148,7 @@ glibtop_get_mem_p (glibtop *server, glib
|
||||
return;
|
||||
}
|
||||
|
||||
@ -46,7 +50,7 @@ $OpenBSD: patch-sysdeps_freebsd_mem.c,v 1.2 2001/09/19 14:37:49 naddy Exp $
|
||||
length_uvmexp = sizeof (uvmexp);
|
||||
if (sysctl (mib_uvmexp, 2, &uvmexp, &length_uvmexp, NULL, 0)) {
|
||||
glibtop_warn_io_r (server, "sysctl (uvmexp)");
|
||||
@@ -172,7 +172,7 @@ glibtop_get_mem_p (glibtop *server, glib
|
||||
@@ -172,7 +174,7 @@ glibtop_get_mem_p (glibtop *server, glib
|
||||
#if defined(__FreeBSD__)
|
||||
v_total_count = vmm.v_page_count;
|
||||
#else
|
||||
@ -55,7 +59,7 @@ $OpenBSD: patch-sysdeps_freebsd_mem.c,v 1.2 2001/09/19 14:37:49 naddy Exp $
|
||||
v_total_count = uvmexp.reserve_kernel +
|
||||
uvmexp.reserve_pagedaemon +
|
||||
uvmexp.free + uvmexp.wired + uvmexp.active +
|
||||
@@ -184,7 +184,7 @@ glibtop_get_mem_p (glibtop *server, glib
|
||||
@@ -184,7 +186,7 @@ glibtop_get_mem_p (glibtop *server, glib
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -64,7 +68,7 @@ $OpenBSD: patch-sysdeps_freebsd_mem.c,v 1.2 2001/09/19 14:37:49 naddy Exp $
|
||||
v_used_count = uvmexp.active + uvmexp.inactive;
|
||||
v_free_count = uvmexp.free;
|
||||
#else
|
||||
@@ -200,7 +200,7 @@ glibtop_get_mem_p (glibtop *server, glib
|
||||
@@ -200,7 +202,7 @@ glibtop_get_mem_p (glibtop *server, glib
|
||||
buf->cached = (u_int64_t) pagetok (vmm.v_cache_count) << LOG1024;
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user