Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

RE: Memory Leaks

Ralph Einfeldt

2004-01-14


In general true and that's what the spec says,

but we had once following experience with a version
of a jvm (can't recall which):

The vm was not able to perform the gc if an out of
memory occured, even if enough free objects where
there to free quite some memory. (Obviously the gc
didn't start at a treshhold but only when the
memory was full, and couldn't get the memory it
needed to perform the task)

The problem vanished when we started to call
gc() on a regular base. the call to gc() had
some effect. (Runtime.freeMemory() grew
after each call to gc()) This indicated, that
(with that specific vm) the call to gc() did
something.

> -----Original Message-----
> From: Shapira, Yoav [mailto:Yoav.Shapira@(protected)]
> Sent: Wednesday, January 14, 2004 3:43 PM
> To: Tomcat Users List
> Subject: RE: Memory Leaks
>
>
> This is a common misconception: System.gc() is merely a suggestion to
> the VM to run collection. The VM is not obliged to run it then, i.e.
> this is not a hard directive. It should never be relied
> upon. With JDK
> 1.4, there's a runtime parameter to ignore System.gc() calls and that
> parameter may be on by default in the future.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.