Memory Doesn't Empty Once Images Close

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Memory Doesn't Empty Once Images Close

Jacob Keller
Dear List,

does anyone know why RAM is not cleared when one closes images in imagej?
Closing imagej entirely solves this, but it has occasionally been a problem
for me...

Jacob

--
*******************************************
Jacob Pearson Keller, PhD
Postdoctoral Associate
HHMI Janelia Farms Research Campus
email: [hidden email]
*******************************************

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Memory Doesn't Empty Once Images Close

Michael Doube-4
Hi Jacob,

Are you talking about the memory which Java is reserving from the system, or the memory reserved by Java which ImageJ is using?

Try garbage collecting (double click on ImageJ's status bar) while running Plugins > Utilities > Monitor Memory...

Does this solve your problem? If not, there may be a memory leak. Normally Java takes care of getting rid of old stuff from memory ('garbage collection') and you don't have to worry about it. It might look as though memory is being taken up but it might be stale stuff which just hasn't yet been garbage collected. When that memory is needed by an active process, Java will do a garbage collection. It's only really a problem if plugins refuse to run with out of memory errors.

Michael


________________________________________
From: ImageJ Interest Group [[hidden email]] on behalf of Jacob Keller [[hidden email]]
Sent: 18 January 2013 03:03
To: [hidden email]
Subject: Memory Doesn't Empty Once Images Close

Dear List,

does anyone know why RAM is not cleared when one closes images in imagej?
Closing imagej entirely solves this, but it has occasionally been a problem
for me...

Jacob

--
*******************************************
Jacob Pearson Keller, PhD
Postdoctoral Associate
HHMI Janelia Farms Research Campus
email: [hidden email]
*******************************************

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
[http://www.rvc.ac.uk/cf_images/button_rvc.png]<http://www.rvc.ac.uk>    [http://www.rvc.ac.uk/cf_images/button_twitter.png] <http://twitter.com/RoyalVetCollege>     [http://www.rvc.ac.uk/cf_images/button_facebook.png] <http://www.facebook.com/theRVC>

This message, together with any attachments, is intended for the stated addressee(s) only and may contain privileged or confidential information. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Royal Veterinary College (RVC). If you are not the intended recipient, please notify the sender and be advised that you have received this message in error and that any use, dissemination, forwarding, printing, or copying is strictly prohibited. Unless stated expressly in this email, this email does not create, form part of, or vary any contractual or unilateral obligation. Email communication cannot be guaranteed to be secure or error free as information could be intercepted, corrupted, amended, lost, destroyed, incomplete or contain viruses. Therefore, we do not accept liability for any such matters or their consequences. Communication with us by email will be taken as acceptance of the risks inherent in doing so.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Memory Doesn't Empty Once Images Close

Michael Schmid
In reply to this post by Jacob Keller
Hi Jacob,

Java is usually very reluctant to give memory back to the operating system, even if it has reserved much more memory than it currently needs. If you have an Oracle JVM, you might have a look at
  http://docs.oracle.com/cd/E19159-01/819-3681/abeii/index.html
You might try modifying the -Xms, -XX:MinHeapFreeRatio and -XX:MaxHeapFreeRatio parameters.

On the Mac, it seems that the java settings are in the Info.plist of the contents (right-click the ImageJ.app, >Show Package Contents). Under Windows, see the ImageJ.cfg in the ImageJ directory.

In most cases, memory reserved by Java is not a big problem: Tho operating system swaps memory to disk if it has not been used for a long time, so the other programs won't suffer too much.

Michael
________________________________________________________________
On Jan 18, 2013, at 04:03, Jacob Keller wrote:

> Dear List,
>
> does anyone know why RAM is not cleared when one closes images in imagej?
> Closing imagej entirely solves this, but it has occasionally been a problem
> for me...
>
> Jacob

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html