On Nov 24, 1:16 pm, Daniel Pitts
<newsgroup.spamfil...@virtualinfinity.net> wrote:
zigzag...@yahoo.com wrote:
I am getting an out of memeory exception error running a java program
on Windows 32 bit.
Memory on the box is 4GB (I know 32 bit can access up to 4GB but
Windows OS reserves 2GB for its own processes. I can increase memory
on this box from 4GB to 8GB, but my question is Java capable of
accessing this memory. In Windows memory beyond
4GB is accessible using /PAE switch and program has to be wriiten in
a ceratin way to use it, that's why my question is whether Java is
capable of accessing 8GB memory on Windows 32 bit?
The Java virtual machine won't necessarily automatically allocate all of
your available memory, it has built in minimums and maximums.
If you're using Suns JVM, try adding -Xmx512M
That sets the max heap size to 512 megs. Experiment with that value.
Cation, don't set it too high either, as you'll degrade the performance
of your garbage collector.
--
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
I am somewhat confused wih this switch, my progam is a third party
program which uses
Apache tomcat, so tomcat5 process is started and my third party
application is
integerated with tomcat. I see tomcat5 process started and I access
third part program's web site, thread count (increases for tomcat5 and
memory usgae increases. I will be suprised if tomcat5 cannot access
memory up to 2GB. Is max heap size per thread or for enitre jvm (i.e.
tomcat5 process).
Prem
memory settings.
for garbage collection.