Salikh Zakirov wrote:
> Alex Blewitt wrote:
>> But the point is, this is a hardcoded default maximum of 256m for no
>> particularly good reason. Why should it not be infinity?
> 
> The following patch does what you are asking for (untested).

Sorry, the first version would lead to integer overflow and the to assertion
failure. The updated patch should work. It runs Hello on Windows/ia32 with a 
warning
about reducing maximum heap size to the virtual address range it could allocate.

$ ./java Hello
WARNING: final heap size is too large, reduced to 900 Mb
Hello


> Care to try?

--- a/vm/gc/src/gc_for_vm.cpp
+++ b/vm/gc/src/gc_for_vm.cpp
@@ -210,8 +210,8 @@ static void parse_configuration_properti
     // set the initial and maximum heap size based on provided options and 
defaults
     const int Mb = 1048576;
     if (0 == final_heap_size_bytes && 0 == initial_heap_size_bytes) {
-        // defaults -Xms64m -Xmx256m
-        final_heap_size_bytes = 256*Mb;
+        // defaults -Xms64m -Xmx\infty
+        final_heap_size_bytes = (POINTER_SIZE_INT)-Mb;
         initial_heap_size_bytes = 64*Mb;
     } else if (0 == initial_heap_size_bytes) {
         // -Xms64m or same as mx, whichever is less


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to