harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Salikh Zakirov <Salikh.Zaki...@Intel.com>
Subject Re: [rant] Memory options in VM -- why is the default not 'unlimited'
Date Sat, 29 Jul 2006 20:17:43 GMT
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: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message