Re: How to deallocate memory

From: Sylvia Murphy (murphys AT XXXXXX)
Date: Tue Dec 02 2003 - 16:42:45 MST


delete is the function you want. you need to remember though that once a
memory threshold has been reached it can never be shortened.


you create a variable x(10,30,40)
and then a variable y(10,30,40)

your total memory allocated at this point is 2*10*30*48*4 for reals

then you delete(x)

your active memory is only y, but the computer keeps the total memory for
the entire job still at the upper limit created by the creation of x and

this is not an NCL issue, but how memory works.

anyway, this may be the behavior you are seeing. when you say that delete
is not working, you can do this test:

x = create array
if x prints then delete is not working. if you get an error message then x
was removed.


On Tue, 2 Dec 2003, Dave Allured wrote:

> Hello.
> How do I actually deallocate unwanted memory when running an NCL script?
> The function delete (var) does not seem to do this according to my
> experiments. I work with large arrays, so sometimes this is important.
> Thank you.
> --Dave A.
> _______________________________________________
> ncl-talk mailing list
> ncl-talk AT

Sylvia Murphy EML: murphys AT
NCAR CGD/CAS PHN: 303-497-1720
3080 Center Green Drive FAX: 303-497-1333
Boulder CO 80301


ncl-talk mailing list
ncl-talk AT

This archive was generated by hypermail 2b29 : Wed Dec 03 2003 - 09:32:26 MST