diff options
author | jdolecek <jdolecek> | 2004-03-14 18:30:31 +0000 |
---|---|---|
committer | jdolecek <jdolecek> | 2004-03-14 18:30:31 +0000 |
commit | 9ac0fdfec0031205962f4e40ace05140e2a581e1 (patch) | |
tree | cdde34206324d7383b6868df22d256b3efe265e1 /x11 | |
parent | dfa800c96cc706991a77998b28d4f6ad2ed05c8e (diff) | |
download | pkgsrc-9ac0fdfec0031205962f4e40ace05140e2a581e1.tar.gz |
force 64bit arithmetic for computation of memory sizes in kcontrol
info module; this fixes int overflow e.g. when having 4G of swap
also add support for CACHED_MEM, count that as sum of cached file
and exec data (for NetBSD 1.6+)
bump pkg revision for this change
Diffstat (limited to 'x11')
-rw-r--r-- | x11/kdebase3/Makefile | 3 | ||||
-rw-r--r-- | x11/kdebase3/distinfo | 3 | ||||
-rw-r--r-- | x11/kdebase3/patches/patch-fh | 49 |
3 files changed, 53 insertions, 2 deletions
diff --git a/x11/kdebase3/Makefile b/x11/kdebase3/Makefile index a8236c66eac..947a8a7cf8c 100644 --- a/x11/kdebase3/Makefile +++ b/x11/kdebase3/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.44 2004/03/14 00:38:19 wiz Exp $ +# $NetBSD: Makefile,v 1.45 2004/03/14 18:30:31 jdolecek Exp $ DISTNAME= kdebase-${_KDE_VERSION} +PKGREVISION= 1 CATEGORIES= x11 COMMENT= Base modules for the KDE 3 integrated X11 desktop diff --git a/x11/kdebase3/distinfo b/x11/kdebase3/distinfo index 48d4f6dd3db..f07bb0567f1 100644 --- a/x11/kdebase3/distinfo +++ b/x11/kdebase3/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.43 2004/03/09 11:33:09 markd Exp $ +$NetBSD: distinfo,v 1.44 2004/03/14 18:30:31 jdolecek Exp $ SHA1 (kdebase-3.2.1.tar.bz2) = 84c8d1f3f0f48870790a66a5c1f4cff981161277 Size (kdebase-3.2.1.tar.bz2) = 17131336 bytes @@ -24,3 +24,4 @@ SHA1 (patch-fd) = 0005eaf7eaecb6377da5342c27effd798f425c95 SHA1 (patch-fe) = 3da89e7228d5246e98a244d7f52d9052c3dbcfa2 SHA1 (patch-ff) = a027ccd5f578d41560e970aa54fca9b5760da0ac SHA1 (patch-fg) = 31219a3d9b45f143dc76ffebd75bbb9b140fcdfa +SHA1 (patch-fh) = 2c3488b20c9ae2710227bd790684b1b7abcc0578 diff --git a/x11/kdebase3/patches/patch-fh b/x11/kdebase3/patches/patch-fh new file mode 100644 index 00000000000..b215441c2f9 --- /dev/null +++ b/x11/kdebase3/patches/patch-fh @@ -0,0 +1,49 @@ +$NetBSD: patch-fh,v 1.1 2004/03/14 18:30:31 jdolecek Exp $ + +--- kcontrol/info/memory_netbsd.cpp.orig 2004-03-14 19:16:08.000000000 +0100 ++++ kcontrol/info/memory_netbsd.cpp 2004-03-14 19:16:39.000000000 +0100 +@@ -26,7 +26,7 @@ + struct uvmexp uvmexp; + #else + struct swapent *swaplist; +- int nswap, rnswap, totalswap, freeswap, usedswap; ++ int64_t nswap, rnswap, totalswap, freeswap, usedswap; + #endif + + /* memory */ +@@ -38,9 +38,6 @@ + else + Memory_Info[TOTAL_MEM] = memory; + +-#warning "FIXME: Memory_Info[CACHED_MEM]" +- Memory_Info[CACHED_MEM] = NO_MEMORY_INFO; // cached memory in ram +- + #ifdef UVM + mib[0] = CTL_VM; + mib[1] = VM_UVMEXP; +@@ -51,13 +48,19 @@ + Memory_Info[INACTIVE_MEM] = NO_MEMORY_INFO; + Memory_Info[SWAP_MEM] = NO_MEMORY_INFO; + Memory_Info[FREESWAP_MEM] = NO_MEMORY_INFO; ++ Memory_Info[CACHED_MEM] = NO_MEMORY_INFO; + } else { +- Memory_Info[FREE_MEM] = MEMORY(uvmexp.free * uvmexp.pagesize); +- Memory_Info[ACTIVE_MEM] = MEMORY(uvmexp.active * uvmexp.pagesize); +- Memory_Info[INACTIVE_MEM] = MEMORY(uvmexp.inactive * uvmexp.pagesize); +- Memory_Info[SWAP_MEM] = MEMORY(uvmexp.swpages * uvmexp.pagesize); +- Memory_Info[FREESWAP_MEM] = MEMORY((uvmexp.swpages - uvmexp.swpginuse) * +- uvmexp.pagesize); ++ t_memsize pgsz = uvmexp.pagesize; ++ Memory_Info[FREE_MEM] = MEMORY(pgsz * uvmexp.free); ++ Memory_Info[ACTIVE_MEM] = MEMORY(pgsz * uvmexp.active); ++ Memory_Info[INACTIVE_MEM] = MEMORY(pgsz * uvmexp.inactive); ++ Memory_Info[SWAP_MEM] = MEMORY(pgsz * uvmexp.swpages); ++ Memory_Info[FREESWAP_MEM] = MEMORY(pgsz * (uvmexp.swpages - uvmexp.swpginuse)); ++#if __NetBSD_Version__ > 106000000 ++ Memory_Info[CACHED_MEM] = MEMORY(pgsz * (uvmexp.filepages + uvmexp.execpages)); ++#else ++ Memory_Info[CACHED_MEM] = NO_MEMORY_INFO; ++#endif + } + #else + Memory_Info[FREE_MEM] = NO_MEMORY_INFO; |