feedback/linux: fix wrong mem size being reported if mem > 4GB. thanks to tomreyn for reporting this issue
authorsheepluva
Mon, 19 Jan 2015 01:18:43 +0100
changeset 10804 f5dc72575c92
parent 10803 df39aa3f6d4d
child 10805 a96a69841653
feedback/linux: fix wrong mem size being reported if mem > 4GB. thanks to tomreyn for reporting this issue
QTfrontend/ui/widget/feedbackdialog.cpp
--- a/QTfrontend/ui/widget/feedbackdialog.cpp	Sun Jan 18 17:14:37 2015 -0500
+++ b/QTfrontend/ui/widget/feedbackdialog.cpp	Mon Jan 19 01:18:43 2015 +0100
@@ -268,7 +268,7 @@
     number_of_cores += QString::number(sysconf(_SC_NPROCESSORS_ONLN)) + "\n";
     quint32 pages = sysconf(_SC_PHYS_PAGES);
     quint32 page_size = sysconf(_SC_PAGE_SIZE);
-    quint32 total = pages * page_size / 1024 / 1024;
+    quint64 total = (quint64)pages * page_size / 1024 / 1024;
     total_ram += QString::number(total) + " MB\n";
     os_version += "GNU/Linux or BSD\n";
 #endif