Re: How to deallocate memory

From: Dave Allured (dave.allured AT XXXXXX)
Date: Tue Dec 02 2003 - 17:14:05 MST


Thank you, this answers my question. I did not state it clearly, but I
was interested in deallocating memory from the computer process, not
just releasing the array into NCL's free space, which I am sure is
working as you say.

If you don't mind me saying so, this might be good for a footnote in the
delete function doc page.

   http://ngwww.ucar.edu/ngdoc/ng/ref/ncl/functions/delete.html

--Dave

Sylvia Murphy wrote:
> dave,
>
> delete is the function you want. you need to remember though that once a
> memory threshold has been reached it can never be shortened.
>
> e.g.
>
> 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
> y.
>
> 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
> delete(x)
> print(x)
> if x prints then delete is not working. if you get an error message then x
> was removed.
>
> sm
>
>
>
>
> 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@ucar.edu
>>http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
>
>
>
> ******************************************************
> Sylvia Murphy EML: murphys@ucar.edu
> NCAR CGD/CAS PHN: 303-497-1720
> 3080 Center Green Drive FAX: 303-497-1333
> Boulder CO 80301
>
>
> WEB: http://www.cgd.ucar.edu/csm/support/
> http://www.cgd.ucar.edu/csm/support/CSM_Graphics/
> ******************************************************
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk@ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



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