Sun Java Plug-in memory leak

T

tgarmanzo

It seems that java is leaking memory no matter how trivial an applet I
run, for example:

import java.applet.Applet;
public class DelthisApplet extends Applet {

}

with the html page:

<HTML>
<HEAD>
</HEAD>
<BODY>
<applet CODE="DelthisApplet.class" width=800 height=800>
</BODY>
</HTML

will keep allocating more and more memory as it runs (using garbage
collect in the console to read the amount free versus the amount
allocated.) I've tested this with java 1.4.2, 1.3.10, and 1.4.2_3
plugins using both IE6 and Mozilla and they all just keep allocating
memory. Unfortunately this causes the applet to crash after running
for a few days and was wondering if anyone happened to know a fix or
if anyone has successfully run an applet for month straight or so. Any
help would be appreciated, thank you.

-Tom G.
 
N

nos

you don't say which os, win or linux.
win is not designed to run for a week without reboot
 
C

Chris Uppal

tgarmanzo said:
It seems that java is leaking memory no matter how trivial an applet I
run, for example:
[snip]

I can't reproduce this with Mozilla Firebird 0.7 -- at least, I set up an
applet as you described and Mozilla showed no sign of increasing memory use
after an hour or so of monitoring.

One difference was that I didn't have the Java console open. Perhaps it's that
that consumes ever-increasing memory ?

-- chris
 
T

tgarmanzo

I'm using Windows XP Professional and have been running it for weeks
without any problems. This java applet however consumes an additional
14meg every 8 hrs which is 486bytes/s. When profiling it in JProfiler
I can't find any leaks, but the difference in there is that the applet
is running in appletviewer instead of IE6. I think my only solution to
the problem is to abandon the applet altogether and make it a full
java application which is kind of silly... oh well.
 
V

Vladimir Kondratyev

Try to use YourKit Java Profiler (http://www.yourkit.com). It has many
advanced features for exploring memory distribution. One the
advantages is that you can run your applet with profiler agent without
lacking performance. And you can capture memory snapshot after 8 hrs
(when the memory is already leaked)

Kind regards,
Vladimir Kondratyev
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top