I was running my J2SE application inside of NB and with a large data set ran
out of heap space. I don’t specify a -Xmx arg for my app and I was curious why
with 32GB of physical memory that should happen. I ran the application again
and, from the command-line, did
jinfo -flag MaxHeapSize xxx (xxx is my app’s process id)
to see how much heap the JVM decided to allocate. It returned
-XX:MaxHeapSize=4294967296
Weird - that’s 1/8th of my physical memory. If memory served, Java was
supposed to use up to 1/4th physical memory for max heap size. So I ran the
application again - this time straight from the command-line rather than from
inside NB. And outside of NB, jinfo reported the expected 8GB of heap:
-XX:MaxHeapSize=8589934592
Does anyone know why that is?
Although I doubt it matters, I’m running on macOS 13.1, NB 13, with NB and my
app both using JDK/JRE 17.
thanks,
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists