[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: about memory



Hong Gang <honggang@uni-bremen.de> writes:

>Hallo all,

>The following is the error given by my program.
>      % Unable to allocate memory: to make array.
>      Cannot allocate memory                 

>I have some large arrays as Tb(632*664, 880).  I do not know what is the
>matter with the program.   Can anyone give me some idea?  

IDL is telling you that the operating system is not allowing it to allocate
enough memory to create the array.  It's not surprising; a floating point array
of that size would take well over a gigabyte of memory.  Generally speaking,
you'd need several times that much memory to manipulate such an array.

You don't mention what operating system you're using.  If Unix, then you can
find out how much memory the operating system will allow you to have by
entering in the command "limit" (before calling IDL).  You can also type
"limit -h" to find the hard limits.  The relevant number is "datasize".  You
can increase this, e.g. "limit datasize 200000" would give you 200 megabytes of
memory.

Probably, you should rewrite your software to manipulate your data in pieces,
instead of all at once.  One way to do this is to write your data to a file,
and then use the ASSOC() function to address parts of the file.

William Thompson