harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arc...@apache.org
Subject svn commit: r370817 - /incubator/harmony/enhanced/jchevm/libjc/native/java_lang_VMRuntime.c
Date Fri, 20 Jan 2006 14:34:03 GMT
Author: archie
Date: Fri Jan 20 06:34:01 2006
New Revision: 370817

URL: http://svn.apache.org/viewcvs?rev=370817&view=rev
Log:
Fix Runtime.maxMemory() to report the actual max heap size, not Long.MAX_VALUE.
Eclipse uses this value to size certain hash tables.

Modified:
    incubator/harmony/enhanced/jchevm/libjc/native/java_lang_VMRuntime.c

Modified: incubator/harmony/enhanced/jchevm/libjc/native/java_lang_VMRuntime.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/jchevm/libjc/native/java_lang_VMRuntime.c?rev=370817&r1=370816&r2=370817&view=diff
==============================================================================
--- incubator/harmony/enhanced/jchevm/libjc/native/java_lang_VMRuntime.c (original)
+++ incubator/harmony/enhanced/jchevm/libjc/native/java_lang_VMRuntime.c Fri Jan 20 06:34:01
2006
@@ -15,7 +15,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  *
- * $Id: java_lang_VMRuntime.c,v 1.7 2005/05/15 21:41:01 archiecobbs Exp $
+ * $Id$
  */
 
 #include "libjc.h"
@@ -110,7 +110,9 @@
 jlong _JC_JCNI_ATTR
 JCNI_java_lang_VMRuntime_maxMemory(_jc_env *env)
 {
-	return _JC_JLONG(0x7fffffffffffffff);
+	_jc_jvm *const vm = env->vm;
+
+	return (jlong)vm->heap.size;
 }
 
 /*



Mime
View raw message