MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: release memory

  • To: mathgroup at
  • Subject: [mg98297] Re: release memory
  • From: Bill Rowe <readnews at>
  • Date: Sun, 5 Apr 2009 06:37:31 -0400 (EDT)

On 4/3/09 at 4:37 AM, summertan at (summer) wrote:

>I am doing a long memory consuming calculation. At certain point I
>get variable contaning huge amount of numerical data. I process it
>and don't need it anymore.

>Is there a way to delete it and RELEASE the memory it takes, i. e.
>make it available?

>I tried ClearAll[...], it deletes the variable but the memory
>doesn't become available - I watch the Windows Task Manager and it
>doesn't show increase in the available memory.

If you haven't read the following tutorials you should


One of the keys is to realize memory will not be released until
there are no references to it in the current session. In
particular, if you have not set $HistoryLength = 0 in the
session, you likely will have references to things you are not
aware of and find it difficult to reclaim all memory.

One convenient way to release memory for several variables at a
time is create a context before creating those variables. Then
the utility CleanSlate can be used to delete the context with
all of the variables it contains, releasing the memory
associated with them.

  • Prev by Date: Re: Map to nested list
  • Next by Date: Re: Interpolation -> segfault?
  • Previous by thread: Re: release memory
  • Next by thread: Re: release memory