java.lang.OutofMemoryError: Java heap space

Landon Fuller landonf at threerings.net
Wed May 30 19:33:00 UTC 2007


On May 30, 2007, at 08:48, Jackson Lima wrote:

> In the page of the program
> (http://beast.bio.ed.ac.uk/Increasing_Memory_Usage) the author
> suggests to modify the code of the TreeAnnotator,  the parameters -
> Xmx and - Xms, I tried - Xms1024m - Xmx1024m but I did not obtain
> success when run the program, therefore this message of error:
>
> "Error occurred during initialization of VM
> Could not reserve enough space for object heap
> Could not create the Java virtual machine.
> Exit 1
> "
> But my limits are:
>
> cputime      unlimited
> filesize     unlimited
> datasize     2097152 kbytes
> stacksize    2097152 kbytes

> Have 4 Gb of Memory.

Java allocates its heap via mmap(MAP_ANON) -- increasing the data  
segment size does the opposite of what you would expect, reserving  
address space that won't be used by mmap(), and causing the above  
failure.

See vm/vm_mmap.c vm_mmap() -- From my cursory reading, mappings'  
'start address' is set after the end of the largest possible heap  
(RLIMIT_DATA).

Try dropping RLIMIT_DATA back to 512Mb.

-landonf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-java/attachments/20070530/63f94265/PGP.pgp


More information about the freebsd-java mailing list