X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 12 Feb 2010 06:37 AM by  anon
Impossible to allocate 500MB Array on 32 bits
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
12 Feb 2010 06:37 AM
    Hello, I get the message "Unable to allocate memory" on a 32 bit window computer. After a complete analysis i determine my application take a maximum of 800MB that is not enough big to stop. I determine exactly which line stop in my code and give the error message. The "Unable To allocate memory" arrive when i tried to read an image with the dimension 3x12578x13984 that require 528MB. After some resarch on the net, i learn that a window 32 bit cannot allocate a 500MB Array, that give me some explication why i have some memory trouble on this line. But what i don't understand, it is that just a little before my application stop because memory, a big array with the same dimensions is created with Make_array : A = make_array(3,12578x13984, /byte) but at this place i don't get the message "unable to allocate memory" whereas the array is supposed to require 528 MB too. Is anybody ould clear me about that Thank for you answer aurelien boulben

    Deleted User



    New Member


    Posts:
    New Member


    --
    12 Feb 2010 12:27 PM
    It depends entirely on the amount of system memory (RAM) you have installed on your machine, and the architecture of the machine. You have indicated that you have a 32bit Windows system. All 32bit systems have an absolute maximum of 4GB of RAM that can be installed (this may be lower depending on your hardware). Windows will hog about half of that, leaving you with only 2GB. This remaining 2GB can theoretically be used by IDL, but the memory may be fragmented, thus only allowing IDL a fraction of that memory. For more information: http://www.ittvis.com/ser...echtip.asp?ttid=3346 Now, Since Windows takes 2GB, and the remaining memory is likely fragmented (see link above), IDL may have access to about 1GB of that. IDL is going to take about 100MB of that just to start up. IDL will then be able to access around 800-900MB of ram to create variables with at maximum. This means that if you already have a 500MB array defined (as you said), and then you attempt to read in another image at about 500MB, this would total about 1GB of memory, which is greater than the amount of memory that IDL has access to. This is entirely limited by Windows and your hardware, IDL has no control over this. If you know you are going to be creating and manipulating large arrays like this, I would suggest a 64bit Machine running 64bit Windows with a large amount of RAM installed, >4GB, perhaps about 8GB would be good. Otherwise, you will have to be careful in your IDL programs to delete old variables, deallocate that memory, before creating new ones. An IDL program you can use to test available memory on 32bit systems can be found here: http://www.ittvis.com/ser...echtip.asp?ttid=3441 Run MEMTEST (see link above) after you launch IDL to determine how much memory you have available to IDL. This will depend greatly on the number of other applications you are running on your machine (Firefox, Word, etc.). -JE support@ittvis.com
    You are not authorized to post a reply.