Solution to IDL Memory Allocation Problem

Long time since the last update of this blog.

I’ve confronted with the following error when trying to processing a large array made up of SECCHI COR2 data, and it had been extremely painstaking before the solution was found. Many of the solutions to the problem told you to simply switch a platform, i.e. from Win 32-bit to Linux, in that the problem inherits from discontiguous distribution of  memory allocation. For a better understanding, let’s suppose you get 1000MB free space in total. However, it may well be that summing up several, i.e., five 200MB discontinuous free space gives you this value. Yet if you want to use 500MB at a time in IDL, the following error warning message pops out:

   % Unable to allocate memory: to make array.
      Not enough space
   % Execution halted at: $MAIN$

I get an excellent alternative way to overcome this problem partly after reading guides from Coyote’s Guide. It works for me! At least I can reduce a median background from the daily stack.

When working with IDL after that aforementioned error message, exit the Workbench first. The next step is to find out a file entitled idlde.ini in one of the files storing IDL. Then use some text editor to open it. It may read like following:


Make sure that {VM_DIR} remains unchanged; it’s the path to Java JVM on your machine and malfunctions may occur otherwise. Change the lines:


Restart your IDL Workbench and you may see difference. Yet please don’t get too exhilrated. If you still use an oversized array, this may not have your problem resolve. Just never be too careful when running IDL in Win 32-bit machine. Frankly speaking it’s better recommended to running IDL in non-Win machines, on which It’s said that more powerfulness of IDL will be functioned, but I can’t tell more as lacking such experience.

Solution to IDL Memory Allocation Problem

3 thoughts on “Solution to IDL Memory Allocation Problem

  1. Snejder says:

    doesn’t solve the problem

    codes are the following:
    IDL> logage=dblarr(1259200)
    IDL> number=91
    IDL> ologlum=9.0d*(findgen(number))/(number-1)-3
    IDL> loglm=dblarr(1259200)
    IDL> likelihood=dblarr(1259200)
    IDL> g1=temporary(transpose(ologlum##replicate(1d,n_elements(logage))))
    IDL> g2=temporary(loglm#replicate(1d,n_elements(logage)))
    % Unable to allocate memory: to make array.
    Cannot allocate memory
    % Execution halted at: $MAIN$

    I use ubuntu 12.04.03 amd64 (8 gig RAM), IDL 7.1.1

    1. sorry, I didn’t try this on ubuntu. The array size seems too tremendous to me. On Win it works with some extended range, yet it’s still not omnipotent. If the size is too large, it fails too.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s