MathGroup Archive 2010

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

Search the Archive

Re: Clearing RAM Memory during evaluation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg111760] Re: Clearing RAM Memory during evaluation
  • From: Sébastien Roy <roys3d at gmail.com>
  • Date: Thu, 12 Aug 2010 05:31:25 -0400 (EDT)
  • References: <i3r10u$dru$1@smc.vnet.net> <i3tntr$s6s$1@smc.vnet.net>

On Aug 11, 4:44 am, Vince Virgilio <blues... at gmail.com> wrote:
> On Aug 10, 4:01 am, Aaron Bramson <aaronbram... at gmail.com> wrote:
>
> > Hello Everybody,
>
> > I am parsing a large data file and naturally this is memory intensive so I
> > am breaking it into the smallest chunks possible.  But I'm still having a
> > problem with memory because I can't seem to clear up my RAM between chunks.
> > So far there is NO output except writing a csv file, and I've cleared the
> > main data-holding variable I use, and all of it is done inside a
> > module...but still when the module finishes the memory isn't cleared.
> > Quitting the kernel does clear the memory, but I can't do that in between
> > calls of this function.  Can anybody tell me what I need to change to get
> > Mathematica to clear the memory at the end of the function?
>
> Aaron,
>
> Mathematica is a bottomless pit when it comes to memory consumption.
> Sooner or later, you will hit this wall. There is no way around it,
> except to save intermediate results to file, restart the kernel(s),
> then continue the computation.
>
> Vince

One thing that helps a lot in practice is:

$HistoryLength = 0

The fact that it is set to infinity by default probably contributes to
the "bottomless pit"...



  • Prev by Date: Re: Frontend suggestions
  • Next by Date: Re: Frontend suggestions
  • Previous by thread: Re: Clearing RAM Memory during evaluation
  • Next by thread: Re: Clearing RAM Memory during evaluation