Memory leak? [message #148888] |
Thu, 23 October 2003 21:43  |
Eclipse User |
|
|
|
Originally posted by: myles_jeffery.hotmail.com
Hi,
I noticed using Windows Task Manager that the memory usage of Eclipse would
continually go up after opening and then closing editors. I presumed there
was a bug with Eclipse or with my custom editor code. On checking with
OptimiseIt it seems that there is no memory leak: all my objects are freed
and in fact Optimizeit reports memory consumption goes back to what it was
after I close the editor: yet in Task Manager it still goes up.
Can anyone explain this?
Thanks,
Myles
|
|
|
|
|
|
|
|
|
Re: Memory leak? [message #149641 is a reply to message #149349] |
Mon, 27 October 2003 04:59  |
Eclipse User |
|
|
|
Originally posted by: vkyr.nospam-ision.net
"CL [dnoyeB] Gilbert" <Lamont_Gilbert@Rigidsoftware.com> schrieb im
Newsbeitrag news:pan.2003.10.27.02.02.36.103207@Rigidsoftware.com...
> On Fri, 24 Oct 2003 13:50:54 +0100, Myles Jeffery wrote:
>
> ...
> When the JVM frees memory (objects), your applicaiton will see this new
> memory available. But task manager will only see more or less memory when
> the JVM frees memory back to windows. This is different from freeing
> memory to your application. The JVM will likely rarely be asked to free
> any of its memory by windows unless you are doing some other windows
> process.
During your use of Eclipse the memory of it's underlayed JVM has an initial
size which can grow on demand until a settable max value. However, the
memory the JVM occupies will not be released in a way that the operating
system gets the memory back. Instead the released memory (via GC) of the JVM
will be still available or reserved for future other objects. You will
really have to quit the running JVM in order to get any of it's occupied
memory back to the underlaying OS.
You can see (as an analogy) the JVM as a glass which wrapper might grow on
demand, but doesn't shrink. Only the contents in the glass (the liquor, in
our case the occupied heap memory for objects etc. which run in the
JVM/glass) can grow and shrink. And in order to shrink the wrapper of the
glass you have to destroy/smash it.
> if you minimize your application and let it idle for a while, then use
> some other app, its likely you will eventually see your JVM release memory
> back to windows.
That's a sort of windows like process memory swapping, if you maximize the
app again after a minimized state, you will see that it again demands the
huge memory as before.
-vkyr
|
|
|
Powered by
FUDForum. Page generated in 0.78466 seconds