Re: Flush/clear memory in ImageJ/Fiji

Posted by Albert Cardona-2 on
URL: http://imagej.273.s1.nabble.com/Flush-clear-memory-in-ImageJ-Fiji-tp3682491p3682492.html

2011/10/19 mjlm <[hidden email]>:

> Hi there,
> Is there a way (e.g. a macro command) to clear out unused, but still
> allocated memory in ImageJ (I'm using Fiji under Win7 64bit)? When I open a
> large file and then close it, the memory used for that large file is
> sometimes not cleared. When I then try to open another large file, I get a
> warning of insufficient memory.
>
> I've tried to trigger Java garbage collection with
> call("java.lang.System.gc"), but it didn't have any effect. My problem
> usually occurs when opening large files using the LOCI tools.


Matthias,

launch the JVM with different flags. Fine-tuning the JVM is an art all
by itself. Here are the parameters that worked for me, along with some
explanations:

http://fiji.sc/wiki/index.php/TrakEM2#Running_fiji_for_heavy-duty.2C_memory-intensive.2C_high-performance_TrakEM2_tasks


Of course, the cheapest of all solutions is to buy more RAM.

Albert

--
http://albert.rierol.net
http://www.ini.uzh.ch/~acardona/