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:31:05 GMT
Salikh Zakirov wrote:
> 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.

This is done because GC needs to have contiguous address range for the heap,
and allocates virtual address range upfront.

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

The size is as low as 900 Mb on my laptop most probably due to some DLL sticking
in the middle of the process address space. I saw DRLVM working with 1300m heap
on some other machine.

What's more, there exists an unpleasant side effect of "infinite" -Xmx.
If you have a leaky native library (and we had!), then the amount
of memory available to the C heap is minimized, and the time range
before your program crashes becomes much shorter.

I saw Eclipse crashing after 1 hour with -Xmx1g, but working for more
than a day with -Xmx600m, which left 400m more megabytes to native heap.

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

View raw message