[Haiku-commits] r26430 - haiku/trunk/src/apps/activitymonitor

axeld at BerliOS axeld at mail.berlios.de
Tue Jul 15 17:59:26 CEST 2008


Author: axeld
Date: 2008-07-15 17:59:26 +0200 (Tue, 15 Jul 2008)
New Revision: 26430
ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=26430&view=rev

Modified:
   haiku/trunk/src/apps/activitymonitor/SystemInfo.cpp
Log:
* Fixed a possible overflow issue - for some reason, the page (and other)
  counter are int32 in system_info.
* This fixes the new issue Bruno saw after the previous fix of bug #2140.


Modified: haiku/trunk/src/apps/activitymonitor/SystemInfo.cpp
===================================================================
--- haiku/trunk/src/apps/activitymonitor/SystemInfo.cpp	2008-07-15 15:55:28 UTC (rev 26429)
+++ haiku/trunk/src/apps/activitymonitor/SystemInfo.cpp	2008-07-15 15:59:26 UTC (rev 26430)
@@ -48,7 +48,7 @@
 SystemInfo::CachedMemory() const
 {
 #ifdef __HAIKU__
-	return fSystemInfo.cached_pages * B_PAGE_SIZE;
+	return (uint64)fSystemInfo.cached_pages * B_PAGE_SIZE;
 #else
 	return 0LL;
 #endif
@@ -58,14 +58,14 @@
 uint64
 SystemInfo::UsedMemory() const
 {
-	return fSystemInfo.used_pages * B_PAGE_SIZE;
+	return (uint64)fSystemInfo.used_pages * B_PAGE_SIZE;
 }
 
 
 uint64
 SystemInfo::MaxMemory() const
 {
-	return fSystemInfo.max_pages * B_PAGE_SIZE;
+	return (uint64)fSystemInfo.max_pages * B_PAGE_SIZE;
 }
 
 




More information about the Haiku-commits mailing list