You could also try to run jmap -histo <PID> when you get the
OutOfMemoryError; you'll probably see the same as in the NetBeans
profiler but maybe it helps to reveal the "memory eater" anyway.
Torsten
Balazs Michnay wrote:
> Hi,
>
> I have just downloaded NetBeans Profiler to see how my web-app performs and
> realized that it produces serious memory leaks... The interesting part is
> that I have nothing on my JSP but static struts tags (no dynamic content at
> all) and it turned out that the leaks are not made by my application, but
> made by either struts (???) or Tomcat (???) or Java itself, I don't know
> what...
> What I discovered was that a simple page reload leads to eating up my memory
> and - according to the profiler - the memory leak is produced by the
> constructor of java.util.zip.InflaterInputStream allocating more and more
> byte[] objects that cannot be garbage-collected. This class deals with
> reading jar files. If I take a look at the source code I can clearly see that
> it really allocates memory for byte[]:
>
> public InflaterInputStream(InputStream in, Inflater inf, int size) {
> super(in);
> if (in == null || inf == null) {
> throw new NullPointerException();
> } else if (size <= 0) {
> throw new IllegalArgumentException("buffer size <= 0");
> }
> this.inf = inf;
> buf = new byte[size];
> }
>
> After browsing through about 80-100 pages I get an OutOfMemory error...
>
> Interesting, huh?
>
> Where should I ask this? On a Java list? Or does this have anything to do
> with Struts (probably not...)?
> Any ideas why this happens are welcome...
>
> Regards,
>
> BM
>
>
>
>
> ____________________________________________________________________________________Be
> a better Globetrotter. Get better travel answers from someone who knows.
> Yahoo! Answers - Check it out.
> http://answers.yahoo.com/dir/?link=list&sid=396545469
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]