I've seen the memory rise and fall so if the GC releases memory, it should
be returned to the OS. It would be my guess that you may not be handling
removing all references to an object the way you think you are. You can test
this out by adding a log in the finalize() method of your object and see if
it ever gets called. You could have a reference somewhere in a static class
or some other class that you have not released as well. As long as there is
more than one reference to an object, the GC will not free it. I had found
this to be the case in something I was working on. It is hard to find at
times but you should be able to find it.

The other thing to remember is that the GC is a very low priority thread and
if the system is very busy, it may not run as often as you would like.

Robert S. Harper
Information Access Technology, Inc.

-----Original Message-----
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 29, 2006 9:44 AM
To: Tomcat Users List
Subject: Re: Handling huge amount data

José,

> Looking Windows Task
> Manager I perceived the natural memory increase.
>
> I noticed that when I
> call my logout method (It calls session.invalidate()) or my user session
> expieres the memory is still in use, in other words, the memory is not
> cleaned.

Windows only reports the size of the application in memory. Once Java
requests memory from the OS, I don't believe that it ever returns it.
So, the memory size reported by Windows Task Manager will only increase,
never decrease.

You need to look at the memory behavior /inside/ the JVM, which is much
more complicated than what Windows Task Manager displays.

There are some tools that will help you see into a JVM, including simply
using the "verbose GC" settings when starting your JVM, as well as some
other 3rd-party tools that can give you a lot of information about the
JVM upon which Tomcat is running (LabmdaProbe comes to mind:
http://www.lambdaprobe.org/d/index.htm).

Hope that helps,
-chris




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to