On SunOS 5.8 I get an error when starting a large Java process with over 2Gb memory.
Error occurred during initialization of VM
Could not reserve enough space for object heap
When stopping several other Java processes we can start this process. This seems to indicate that we don't have enough consecutive memory blocks available.
top reports the following:
load averages: 0.81, 0.91, 1.26 17:03:16
284 processes: 283 sleeping, 1 on cpu
CPU states: 90.4% idle, 6.0% user, 2.4% kernel, 1.1% iowait, 0.0% swap
Memory: 32G real, 11G free, 28G swap in use, 2491M swap free
Thus even though we have 11Gb out of 32Gb free on our 6CPU system we can't allocate enough memory.
We have 2Gb heap allocated. The issue is not a java issue because this is an OS message produced on the native stdout, not SystemOut from java. The Solaris system is unable to allocate enough memory for the JVM, even though it reports to have 12Gb available. If we stop other large memory consuming processes it is possible to start this JVM process. How is it possible that Solaris can't allocate 2Gb to 3Gb memory when there's 6 times that much available?
I'm afraid I misunderstood your first post, I'm sorry.
That's a little bit weird... I'm talking about the fact that when you stop other java processes it works...
how much swap space do you have?
I think I've read somewhere that you might need some amount of swap space available when using large amounts of heap...