forked from pool/kinfocenter5
30 lines
965 B
Diff
30 lines
965 B
Diff
|
From 10d60170eaa46c3e4233c4eef966418d0065754d Mon Sep 17 00:00:00 2001
|
||
|
From: Christoph Feck <cfeck@kde.org>
|
||
|
Date: Tue, 30 Apr 2019 00:55:12 +0200
|
||
|
Subject: Correctly show memory sizes > 4 GiB on 32 bit Linux
|
||
|
|
||
|
BUG: 406351
|
||
|
FIXED-IN: 5.16.0
|
||
|
|
||
|
Differential Revision: https://phabricator.kde.org/D20828
|
||
|
---
|
||
|
Modules/about-distro/src/Module.cpp | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/Modules/about-distro/src/Module.cpp b/Modules/about-distro/src/Module.cpp
|
||
|
index 56358cd..b4bc67e 100644
|
||
|
--- a/Modules/about-distro/src/Module.cpp
|
||
|
+++ b/Modules/about-distro/src/Module.cpp
|
||
|
@@ -56,7 +56,7 @@ static qlonglong calculateTotalRam()
|
||
|
struct sysinfo info;
|
||
|
if (sysinfo(&info) == 0)
|
||
|
// manpage "sizes are given as multiples of mem_unit bytes"
|
||
|
- ret = info.totalram * info.mem_unit;
|
||
|
+ ret = qlonglong(info.totalram) * info.mem_unit;
|
||
|
#elif defined(Q_OS_FREEBSD)
|
||
|
/* Stuff for sysctl */
|
||
|
size_t len;
|
||
|
--
|
||
|
cgit v1.1
|
||
|
|