| Re: Memory allocation problem [message #63971 is a reply to message #32923] |
Wed, 26 November 2008 08:45   |
Jean H.
Messages: 472 Registered: July 2006
|
Senior Member |
|
|
kodark@gmail.com wrote:
> Hi all,
>
> I am a beginner-level user of IDL. Recently I run into the memory
> allocation problem: 'unable to allocate memory'. I loaded a large
> image (11820*11820, float, about 530M) into an array. Then when I
> tried to create two new arrays of the same size, the program said
> 'unable to allocate memory'.
>
> I have read a lot of articles about this problem on the net, but I
> still cannot solve this problem. My computer runs 32-bit Windows XP
> with 4GB RAM and I have assigned 10GB from hard drive to Virtual
> Memory. The virtual memory looks contiguous in the Disk Defragmenter
> program. I am curious about the following output.
>
> Kodark
Hi Kodark,
Ok, 3 things here:
1) switch to Linux... you will have access to most of your 4 Gb of
memory, and, best of all, it's almost all continuous! I did it a few
years ago and have not regretted it!
2) With IDL 6 (and before), you can, under windows, have up to 3Gb of
memory (the segmentation problem is still there though). You need to
alter to IDL exe and to tell windows to start in 3Gb mode. The later is
easy (on your boot menu, add /3gb to the end). The former is slightly
more complicated... You need Visual Studio, use "editbin" on idl.exe,
then set the "large address space aware" flag to 1. Google it for more
info! BUT, your system may become unstable...
3)divide your work!... don't use 1 big array, but 4,9 or whatever it
takes smaller arrays! You can easily modify the memtest program to have
it return the available memory. Then, based on your knowledge of the
memory you will need for your computations, chunk the array accordingly!
Jean
|
|
|
|