Hi There,

        You can invoke the garbage collector by using the System.gc() method.

The memory is never returned to OS but the JVM keeps it in a pool used for
object creation, it would make no sense in releasing this back to the OS as
it will probably need to use it at some point or another.

In more recent JVM's (1.4 onwards) the garbage collector has been threaded
to improve performance and penalties as until then the cost of a collection
was relatively expensive.

For more information read the documentation at www.java.sun.com

Hope this helps

Pete

-----Original Message-----
From: Michael Duffy [mailto:[EMAIL PROTECTED]
Sent: 14 January 2004 14:07
To: Tomcat Users List
Subject: Re: Memory Leaks



My understanding is that the GC runs on a low-priority
thread, so you never get to tell it when to run.  The
operating system and JVM deal with it.

I also recall reading that memory is returned to the
JVM, but not released back to the OS.  So if you're
watching Memory Usage in the Windows Task Manager and
not seeing it go down, that might explain why. - MOD




--- Christian Witucki <[EMAIL PROTECTED]>
wrote:
> Does anyone know that when Garbage Collection is
> going on how often it should be set to collect and
> if memory is really being returned.  I believe that
> the memory is not, but how can I check to determine
> that???
>
> Christian Witucki
> Network Analyst
> 375 Essjay Road
> Williamsville, NY 14221
> 716-631-3001 x3812
>
> CONFIDENTIALITY NOTICE. This e-mail and attachments,
> if any, may contain confidential information which
> is privileged and protected from disclosure by
> Federal and State confidentiality laws, rules or
> regulations.  This e-mail and attachments, if any,
> are intended for the designated addressee only .  If
> you are not the designated addressee, you are hereby
> notified that any disclosure, copying, or
> distribution of this e-mail and its attachments, if
> any, may be unlawful and may subject you to legal
> consequences.  If you have received this e-mail and
> attachments in error, please contact Independent
> Health immediately at (716) 631-3001 and delete the
> e-mail and its attachments from your computer.
> Thank you for your attention.
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to