http://imagej.273.s1.nabble.com/increasing-memory-allocation-via-Java-code-tp3689982p3689989.html
Give a try to java command line argument -XX:+AggressiveHeap. It might
solve the problem or make it worse. ;) At least in some Linux systems it
works well.
> I have the following; 4-core; 8GB RAM, 7GB allocated and able to handle
> until 5601MB (!), but Win7 (Java 1.6).
>
> Best,
> Johannes
>
> Thomas Boudier schrieb:
>> Hi Cedric,
>>
>> I have a 4-core system with 8 Gb of RAM, I have allocated like you 5Gb
>> for java, I can create a 4.5 Gb image. Of course I'm on linux, with
>> sun java 1.6.
>>
>> a bientot
>>
>> Thomas
>>
>>
>> Cédric Messaoudi a écrit :
>>> I have to point out that the jvm from sun (on windows, I didn't check
>>> on
>>> linux) has a small limitation of memory on multi core/cpu systems.
>>>
>>> On my dual core cpu in my laptop with 8 GB of RAM, I am able to start
>>> ImageJ
>>> with the option -Xmx5000m but when trying to allocate a volume of 4 GB
>>> I
>>> have an out of memory error. It seems that the jvm from sun is dividing
>>> actual RAM memory by the number of cores. Would it be possible to other
>>> people to test this issue?
>>> Trying BEA jvm (jrockit) allowed me some time ago to solve this
>>> problem.
>>> Actually I mostly use virtual stack to open very big dataset, so it
>>> not a
>>> problem from my part to use the jvm from sun.
>>>
>>> Regards,
>>> Cédric
>>>
>>>
>>>
>>> ----------------------------------------------------------
>>> Cédric MESSAOUDI
>>> Institut Curie - INSERM U759 Laboratoire d'Imagerie Intégrative
>>> Bât 112, Centre Universitaire d'Orsay 91405 Orsay CEDEX
>>> France
>>> ----------------------------------------------------------
>>>
[hidden email]
>>> ----------------------------------------------------------
>>>
>>>
>>>
>>> -----Message d'origine-----
>>> De : ImageJ Interest Group [mailto:
[hidden email]] De la part de
>>> Pang,
>>> Zhengyu (GE, Research)
>>> Envoyé : vendredi 11 décembre 2009 15:44
>>> À :
[hidden email]
>>> Objet : Re: what is real max memory limit of ImageJ ?
>>>
>>> Franklin,
>>>
>>> Size of image is different from size of image stored in the memory.
>>> JPEG
>>> image size is much smaller than TIFF, but when it is loaded to memory,
>>> it is same as TIFF file.
>>>
>>> In your application, I wonder if you close images once you are done
>>> with
>>> those image. Just use close(), then your computer could free up the
>>> space.
>>>
>>> Hopefully it helps.
>>>
>>> Zhengyu
>>>
>>> Dr. Zhengyu Pang
>>> Biochemistry and Biological Engineering Laboratory
>>> General Electric Company Global Research
>>>
>>> GE Imagination at work
>>>
>>> -----Original Message-----
>>> From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of
>>> Franklin Shaffer
>>> Sent: Friday, December 11, 2009 9:12 AM
>>> To:
[hidden email]
>>> Subject: what is real max memory limit of ImageJ ?
>>>
>>> I am doing particle recognition and tracking of images on high speed
>>> videos. I break the hs video up into images, then load the image
>>> sequence into ImageJ.
>>>
>>> I put 64 GB of RAM in a very fast PC (HP Z800). I try to load a
>>> sequence of 50,000 image files, but I get a memory error after it loads
>>> about 40,000. The total combined size of all of the 50,000 images is
>>> 20
>>> GB. But I have 64 GB of RAM, and I have the memory limit set in ImageJ
>>> as 50 GB.
>>>
>>> So if I tell ImageJ to use 50 GB of RAM, why is it giving memory errors
>>> when I try to load 20 GB of images ?
>>>
>>> ImageJ is an excellent code for cell/particle analysis, so I want to
>>> continue using it.
>>>
>>> Thank you all for building ImageJ!
>>> Frank Shaffer
>>> Research Engineer, National Energy Technology Laboratory, US.
>>>
[hidden email]
>>>>>> "Roy Wollman" <
[hidden email]> 10/30/2009 9:47 PM >>>
>>> Hi All,
>>>
>>> I'm trying to import few of the ImageJ classes to use within matlab.
>>> Matlab has great java support which basically means that I can create
>>> objects on the command line (e.g. stk=imp.createEmptyStack();).
>>>
>>> However, the maximal memory allocation is too low. Since I'm running on
>>> a OS-X with 64-bit and lots of memory I want to increase the maximal
>>> memory allocation. I already don't so in the standalone
>>> ImageJ64 application and it works great.
>>>
>>> Here is the matlab code I'm using:
>>>
>>> javaaddpath
>>> /Applications/ImageJ/ImageJ64.app/Contents/Resources/Java/ij.jar
>>> import ij.*;
>>> mem=ij.plugin.Memory;
>>> mem.run('');
>>>
>>> Than I get the menu in which I change the total memory but.... I get
>>> the
>>> following message:
>>>
>>> ImageJ is unable to change the memory limit. For more information,
>>> refer
>>> to the installation notes at
>>>
>>>
http://rsb.info.nih.gov/ij/docs/install/>>> The ImageJ application (ImageJ.app) was not found.
>>>
>>> Current limit: 189MB
>>>
>>> Since the java objects are created within matlab its not my job to
>>> worry
>>> about memory management but matlab's problem. Is there another way to
>>> increase the limit or just disable the memory limit altogether?
>>>
>>> Thanks,
>>> Roy
>>>
>>>
>>
>
>
> --
> Mag. Johannes-P. KOCH
> Department of Biochemistry and Cell Biology
> MFPL, University of Vienna
> Dr. Bohrgasse 9/5
> A-1030 Vienna
> Austria
>
> phone: 0043 1 4277 52809
> fax: 0043 1 4277 9528
>
> mail to:
[hidden email]
>