summaryrefslogtreecommitdiff
path: root/NET/worlds/console/StatMemNode.java
diff options
context:
space:
mode:
Diffstat (limited to 'NET/worlds/console/StatMemNode.java')
-rw-r--r--NET/worlds/console/StatMemNode.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/NET/worlds/console/StatMemNode.java b/NET/worlds/console/StatMemNode.java
index 1e3fc21..b5031dd 100644
--- a/NET/worlds/console/StatMemNode.java
+++ b/NET/worlds/console/StatMemNode.java
@@ -34,7 +34,8 @@ public class StatMemNode extends StatMan implements MainCallback {
StatisticsRoot.getNode().addChild(this);
}
- public static native void nativeInit();
+ public static void nativeInit() {
+ }
@Override
public String toString() {
@@ -101,5 +102,12 @@ public class StatMemNode extends StatMan implements MainCallback {
this._grabbedList.replaceItem("Available Virtual Memory: " + this._availPageMem + " bytes", 8);
}
- public native void updateMemoryStatus();
+ public void updateMemoryStatus() {
+ Runtime runtime = Runtime.getRuntime();
+
+ this._totPhysMem = (int)runtime.maxMemory();
+ this._availPhysMem = (int)runtime.freeMemory();
+ this._totPageMem = (int)runtime.totalMemory();
+ this._availPageMem = (int)(runtime.maxMemory() - (runtime.totalMemory() - runtime.freeMemory()));
+ }
}