harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From v..@apache.org
Subject svn commit: r643014 - /harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryUsage.java
Date Mon, 31 Mar 2008 14:58:56 GMT
Author: vmz
Date: Mon Mar 31 07:58:52 2008
New Revision: 643014

URL: http://svn.apache.org/viewvc?rev=643014&view=rev
Log:
HARMONY-5523 [drlvm][gc][lang-management][geronimo] MemoryUsage returns incorrect values
Committed a fix to issue 3: toString() method works incorrectly (output is badly readable).
Now the output on Harmony looks like this:
init = 268435456 (262144K) used = 268435456 (262144K) committed = 268435456 (262144K) max
= 268435456 (262144K)

Modified:
    harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryUsage.java

Modified: harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryUsage.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryUsage.java?rev=643014&r1=643013&r2=643014&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryUsage.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryUsage.java
Mon Mar 31 07:58:52 2008
@@ -111,7 +111,9 @@
 
     @Override
     public String toString() {
-        return "MemoryUsage: init=" + init + "used=" + used + "committed=" + committed +
"max="
-                + max;
+        return "init = " + init + " (" + (init >> 10)
+          + "K) used = " + used + " (" + (used >> 10)
+          + "K) committed = " + committed + " (" + (committed >> 10)
+          + "K) max = " + max + " (" + (max >> 10) + "K)";
     }
 }



Mime
View raw message