I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit c6c61c9e authored by zzz's avatar zzz
Browse files

Summary bar: Bounds check on memory info

parent 8d6d1bc7
No related branches found
No related tags found
No related merge requests found
......@@ -315,6 +315,8 @@ public class SummaryHelper extends HelperBase {
}
used /= 1024*1024;
long total = tot / (1024*1024);
if (used > total)
used = total;
// long free = Runtime.getRuntime().freeMemory()/1024/1024;
// return integerFormatter.format(used) + "MB (" + usedPc + "%)";
// return integerFormatter.format(used) + "MB / " + free + " MB";
......@@ -339,6 +341,10 @@ public class SummaryHelper extends HelperBase {
used /= 1024*1024;
}
long total = tot / (1024*1024);
if (used > total)
used = total;
if (usedPc > 100)
usedPc = 100;
// long free = Runtime.getRuntime().freeMemory()/1024/1024;
// return integerFormatter.format(used) + "MB (" + usedPc + "%)";
// return integerFormatter.format(used) + "MB / " + free + " MB";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment