> > That java gets out of memory errors, and that the maximum heap size
> > needs to be controlled by a flag has always bugged me. Why is this so?
[quoted text clipped - 20 lines]
>
> Arne
unlimited eh? Thanks.
> > That java gets out of memory errors, and that the maximum heap size
> > needs to be controlled by a flag has always bugged me. Why is this so?
[quoted text clipped - 20 lines]
>
> Arne
actually, upon checking unlimited doesn't seem to be acceptable...
this again raises the problem with -Xmx, that it forces me to put a
hard limit on a dynamically allocated resource...
Now that you mention it, old mac os 9 used to require a max heap size
set for every application (get info, maximum memory). However, that
was a horribly primitive system. I understand that they'd want mac
compatibility, but it seems unfortunate that they did it in such a way
that made everyone else suffer... I'd like my programs not to die
every time they get an unexpectedly large input. However high I set
the -Xmx value it's always possible that more heap space will be
necessary.
Given virtual memory, and the fact the fact that on a reasonable
application only a small subset of memory need to be accessible in
ram, thrashing isn't really a problem, there's really no practical
limit to a maximum heap size.
Chris Dollin - 31 May 2007 10:17 GMT
> Given virtual memory, and the fact the fact that on a reasonable
> application only a small subset of memory need to be accessible in
> ram, thrashing isn't really a problem, there's really no practical
> limit to a maximum heap size.
Those who have experienced systems thrashing may disagree.

Signature
"We did not have time to find out everything /A Clash of Cymbals/
we wanted to know." - James Blish
Hewlett-Packard Limited registered no:
registered office: Cain Road, Bracknell, Berks RG12 1HN 690597 England
Arne Vajhøj - 01 Jun 2007 03:03 GMT
> actually, upon checking unlimited doesn't seem to be acceptable...
> this again raises the problem with -Xmx, that it forces me to put a
> hard limit on a dynamically allocated resource...
> Given virtual memory, and the fact the fact that on a reasonable
> application only a small subset of memory need to be accessible in
> ram, thrashing isn't really a problem, there's really no practical
> limit to a maximum heap size.
????
The highest limit you can set with Xmx is the limit imposed
by the limits in the virtual address space.
Java can not get more from the operating system.
Arne