* 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
This commit is contained in:
Axel Dörfler
2008-07-15 15:59:26 +00:00
parent 84e23a5d08
commit 706b0852bd
+3 -3
View File
@@ -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;
}