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:

   -vm
   {VM_DIR}
   -vmargs
   -Xms256M
   -Xmx768M
   -XX:MaxPermSize=128m

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:

   -vm
   {VM_DIR}
   -vmargs
   -Xms128M
   -Xmx128M
   -XX:MaxPermSize=128m

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.

Advertisements
Solution to IDL Memory Allocation Problem