pkgsrc/sysutils/libgtop/patches/patch-ad
agc 20cdfbdcfb Initial import of libgtop-0.26 into the Packages Collection. This is
part of the GNOME project, and is used to retrieve system information,
such as CPU usage etc.
This is not yet complete, but is functional to the point where the
whole thing compiles and installs.  Someone else can pick this up and
run with it now.
1998-10-07 13:11:35 +00:00

24 lines
785 B
Text

$NetBSD: patch-ad,v 1.1.1.1 1998/10/07 13:11:35 agc Exp $
--- sysdeps/bsd/mem.c 1998/10/06 16:43:47 1.1
+++ sysdeps/bsd/mem.c 1998/10/06 16:48:51
@@ -116,11 +116,19 @@
/* convert memory stats to Kbytes */
+#ifdef __NetBSD__
+ buf->total = (u_int64_t) pagetok (vmm.v_kernel_pages) << LOG1024;
+#else
buf->total = (u_int64_t) pagetok (vmm.v_page_count) << LOG1024;
+#endif
buf->used = (u_int64_t) pagetok (vmm.v_active_count) << LOG1024;
buf->free = (u_int64_t) pagetok (vmm.v_free_count) << LOG1024;
+#ifdef __NetBSD__
+ buf->cached = (u_int64_t) pagetok (vmm.v_wire_count) << LOG1024;
+#else
buf->cached = (u_int64_t) pagetok (vmm.v_cache_count) << LOG1024;
+#endif
buf->shared = (u_int64_t) pagetok (vmt.t_vmshr) << LOG1024;
buf->buffer = (u_int64_t) bufspace;