-
jview profiler and memory leaks
hello,
I have a couple of game applets that have memory leaks.
simply after playing the games for about 20 minutes the applets stop and
a java.lang.outofmemory exception occurs.
I used the jview.exe profiler in my visual studio J++ to check for any
objects that consume too much memory
during execution.
the command for running jview's profiler is
jview /a -prof erclassalloc,file=prof.out
"D:\games\SpinningBubblesTwo\Page1.htm"
I dump all of the profiler's output to prof.out file. Then I check the
output file prof.out
and i have many lines like the sample below that list all of the objects
used during execution of
the program and that state how many objects were instantiated and how much
of bytes of memory
they used. See example below-->
Total Per GC Overall
Type
Num Bytes Num Bytes #/Bytes
java.awt.event.MouseEvent
62 3224 7 403 0% 0%
followed by this important line
this is the line, below
[I
222 675368 27 84421 1% 46%
which tells me that [I uses 46% of the memory in the program.
the sample line says that the class java.awt.event.MouseEvent uses 0% of #
of objects and 0% of bytes of memory.
does any one know what the [I object/class is in the output. I think that
it can be the source of the memory
leak since it consumes close to 50% of the memory allocated by the java
virtual machine.
any help is appreciated
mike
-
I would suggest downloading a trial of a better profiler - my personal favourite is JProbe. However, it working will depend whether or not you've used any nasty J++, platform-dependant code. Probably worth a go though...
ArchAngel.
O:-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks