Re: Clear everything in IDL? [message #9932] |
Wed, 24 September 1997 00:00  |
Peter Mason
Messages: 145 Registered: June 1996
|
Senior Member |
|
|
On Tue, 23 Sep 1997, Alex Schuster wrote:
> Matthew J. Sheats wrote:
>> I've tried this.. unfortunately ( In windows NT anyway.. I haven't
>> tried else where ) It does not seem to actually release the memory as
>> such.
>> Internal to IDL, it may mark that region of memory as freed, but
>> Windows never receives that memory back until IDL is closed. It would
>> also appear that any additional memory allocated doesn't utilize this
>> memory which idl has already allocated, but instead pulls more off of
>> NT's heap.
>
> You're right! The IDL FAQ has a topic covering this. Have a look at
> http://ww2.sd.cybernex.net/~mgs/idl_faq.html#T27
This is a problem that Unix IDL users know and hate - the IDL session's "data
space" never gets reduced in size. (It's an operating-system issue, not
an IDL issue.)
Now try not to laugh, but if this is a major issue for you then you might be
better off using Windows 95 instead of NT. Win95 appears to release memory
back to the system as soon as it is "freed" in IDL. (I must say that I'm
disappointed to hear that NT seems to have the same dog-with-a-bone problem as
Unix.)
If you are swinging huge arrays around in IDL then it'll probably be worth your
while to explore the way IDL uses memory "on the sly". This is easy under
Win95. Start the System Monitor and get a "Memory Manager: Allocated Memory"
display going, and start an IDL session. Get yourself a chunky array, e.g.,
N=1024L*1024L*32L & B=BYTARR(N). Try out some stuff. e.g., Watch your
computer go to lunch when you type B(*)=1B. Enjoy the German engineering of
B=TEMPORARY(B)+1B. Look on in horror at B=TEMPORARY(B)+1. See if your
computer is even capable of B(*)=1L. And try out some of the operations your
program does on large arrays.
Peter Mason
CSIRO division of Exploration and Mining
P.O Box 136, North Ryde, NSW, 2113, Australia
E-Mail: p.mason@syd.dem.csiro.au Tel: +61 2 9490-8883 Fax: 9490-8960/8921
Web: http://www.syd.dem.csiro.au/research/MMTG/
|
|
|