hi,
i have a java application that can be fairly memory intensive. so, when i
run the program, i use the -Xmx option to prevent out of memory errors.
in particular, i have been using -Xmx512m, which should be enough for my
needs... but the out of memory errors continue.
so, i tried to observe this in action.
i ran top while my program was executing, and sorted by memory usage. as
expected on linux, all the java threads show up as processes. now, top
reports the rss on each thread to be around 75MB when the application hits
the error... and about 7-8 threads when this occurs. now i know that the
-Xmx option is for java objects only, and doesn't pertain to the virtual
machine's own memory requirements... but this observation seems to
indicate that each thread actually is consuming its own 75MB of memory.
this is also supported with each java thread only consuming about 4K of
shared memory, as reported by "top".
is what i think i'm observing actually happening? is each java thread
actually consuming that much extra memory (i.e. without sharing it all
through the single java virtual machine heap)? somehow, i doubt it... but
the out of memory errors seem to be happening well before 512MB of java
object information is created.
note, too, that i am not actually creating these seperate threads... my
app is single-threaded... the 7-8 are those threads executed intially by
the java virtual machine.
thanks for any insight on this matter... or even a link to a good source
that describes this.
thanks much again,
murat
--
Murat Tasan
mx**@po.cwru.edu
ta***@eecs.cwru.edu
mu*********@cwru.edu
http://genomics.cwru.edu