* 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:
@@ -48,7 +48,7 @@ uint64
|
|||||||
SystemInfo::CachedMemory() const
|
SystemInfo::CachedMemory() const
|
||||||
{
|
{
|
||||||
#ifdef __HAIKU__
|
#ifdef __HAIKU__
|
||||||
return fSystemInfo.cached_pages * B_PAGE_SIZE;
|
return (uint64)fSystemInfo.cached_pages * B_PAGE_SIZE;
|
||||||
#else
|
#else
|
||||||
return 0LL;
|
return 0LL;
|
||||||
#endif
|
#endif
|
||||||
@@ -58,14 +58,14 @@ SystemInfo::CachedMemory() const
|
|||||||
uint64
|
uint64
|
||||||
SystemInfo::UsedMemory() const
|
SystemInfo::UsedMemory() const
|
||||||
{
|
{
|
||||||
return fSystemInfo.used_pages * B_PAGE_SIZE;
|
return (uint64)fSystemInfo.used_pages * B_PAGE_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint64
|
uint64
|
||||||
SystemInfo::MaxMemory() const
|
SystemInfo::MaxMemory() const
|
||||||
{
|
{
|
||||||
return fSystemInfo.max_pages * B_PAGE_SIZE;
|
return (uint64)fSystemInfo.max_pages * B_PAGE_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user