Re: Memory deallocate problem [message #11295] |
Fri, 27 March 1998 00:00  |
Liam Gumley
Messages: 473 Registered: November 1994
|
Senior Member |
|
|
Ying Jin wrote:
> Does anyone know the mechanism of memory deallocation of IDL ?
> My problem is :
> When I open several big arrays, I literally exhaust all the available
> memory, but I need more. And I don't care to deallocate the memory
> for the previous arrays.
> I have digged through the help and manual of the IDL version 4.0.3.
> It turns out that IDL seems to not want user to tackle the issue by
> themselves.
IDL isn't going to change in a hurry, so you've got to adapt. Here's
some strategies:
(1) Don't use huge arrays. Spend a few minutes thinking about the
problem, and see if you can come up with an algorithm that handles the
problem in more reasonable chunks.
(2) Whenever you're done processing a large array, make sure you use
TEMPORARY() to undefine it, e.g. TVSCL, TEMPORARY(IMAGE). This makes a
big difference if you use it consistently. David Fanning's UNDEFINE
program (http://www.dfanning.com/programs/undefine.pro) is very useful
in this respect.
(3) If you're using a PC or Mac, buy more memory. On a PC 32MB can be
had for $75 or less, so why not stick and extra 64MB in that old PC.
Cheers,
Liam.
|
|
|