diff src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 1092:ed52bcc32739

6880903: G1: G1 reports incorrect Runtime.maxMemory() Summary: G1 reports committed memory instead of reserved memory from the Runtime.maxMemory() method Reviewed-by: ysr, jmasa
author tonyp
date Fri, 04 Dec 2009 07:44:35 -0500
parents db0d5eba9d20
children 44f61c24ddab
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Dec 03 15:01:57 2009 -0800
+++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Fri Dec 04 07:44:35 2009 -0500
@@ -2130,7 +2130,7 @@
 }
 
 size_t G1CollectedHeap::max_capacity() const {
-  return _g1_committed.byte_size();
+  return g1_reserved_obj_bytes();
 }
 
 jlong G1CollectedHeap::millis_since_last_gc() {