From 46f84134a9f118a131af9fc1aadc293f8312aa86 Mon Sep 17 00:00:00 2001 From: Wim van der Meer Date: Fri, 11 Jun 2010 10:56:39 +0000 Subject: [PATCH] Use B_PAGE_SIZE for calculating memory size in the AboutSystem app. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37097 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/aboutsystem/AboutSystem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/aboutsystem/AboutSystem.cpp b/src/apps/aboutsystem/AboutSystem.cpp index 51f05a6238..1fffdefe43 100644 --- a/src/apps/aboutsystem/AboutSystem.cpp +++ b/src/apps/aboutsystem/AboutSystem.cpp @@ -1673,8 +1673,8 @@ static const char* MemUsageToString(char string[], size_t size, system_info* info) { snprintf(string, size, B_TRANSLATE("%d MB total, %d MB used (%d%%)"), - int(info->max_pages / 256.0f + 0.5f), - int(info->used_pages / 256.0f + 0.5f), + int(info->max_pages * (B_PAGE_SIZE / 1048576.0f) + 0.5f), + int(info->used_pages * (B_PAGE_SIZE / 1048576.0f) + 0.5f), int(100 * info->used_pages / info->max_pages)); return string;