MathGroup Archive 2009

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

Search the Archive

Re: Strong memory consumption by List-plotting functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg102325] Re: Strong memory consumption by List-plotting functions
  • From: Szabolcs <szhorvat at gmail.com>
  • Date: Wed, 5 Aug 2009 05:45:57 -0400 (EDT)
  • References: <h58ra7$q0l$1@smc.vnet.net>

On Aug 4, 11:25 am, markus <markusg.phys at googlemail.com> wrote:
> Hi again,
>
> it seems that functions like ListVectorPlot3D, ListContourPlot3D, and
> similar ones, have a kind of memory leakage: each time one of these
> functions is executed, the memory usage increases (as indicated by the
> SystemMonitor). That is, after calling these functions, say 20 times,
> with some larger dataset, all my RAM is used up and I have to restart
> Mathematica. Using constructs like
> g = ListVectorPlot[...]
> ...
> Clear[g]
> also don't help.
>

A likely reason for this problem is that Mathematica remembers all the
outputs.  You can access the last output with %, the output before
that with %%, etc.  Or access the first output with Out[1], the second
with Out[2], etc.

So when you do g = ListVectorPlot[...]; Clear[g], the graphics output
will still be remembered in the Out variable.

To limit the number of outputs that Mathematica will remember, you can
use $HistoryLength.  Try $HistoryLength = 0, or $HistoryLength = 1 to
remember only the last output.  I regularly use these when creating
very large graphics.


  • Prev by Date: Re: A Sum-like notation for iteration
  • Next by Date: Re: Strong memory consumption by List-plotting functions
  • Previous by thread: Re: Strong memory consumption by List-plotting functions
  • Next by thread: Re: Strong memory consumption by List-plotting functions