From 706b0852bd9c5160a8228931590d48f31a4f42d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 15 Jul 2008 15:59:26 +0000 Subject: [PATCH] * 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. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26430 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/activitymonitor/SystemInfo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/activitymonitor/SystemInfo.cpp b/src/apps/activitymonitor/SystemInfo.cpp index 84a7b272bc..4ded447052 100644 --- a/src/apps/activitymonitor/SystemInfo.cpp +++ b/src/apps/activitymonitor/SystemInfo.cpp @@ -48,7 +48,7 @@ uint64 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 @@ SystemInfo::CachedMemory() const 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; }