MathGroup Archive 2003

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

Search the Archive

Re: What Happens to Garbage in Mathematica?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg43969] Re: What Happens to Garbage in Mathematica?
  • From: nafod40 <noneya at business.com>
  • Date: Thu, 16 Oct 2003 04:16:02 -0400 (EDT)
  • Organization: Penn State University, Center for Academic Computing
  • References: <bm84s2$fug$1@smc.vnet.net> <bmg0nf$e9t$1@smc.vnet.net> <bmj2j5$pqs$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Steven T. Hatton wrote:
> 
> I really don't care too much if the OS gets the memory back. What matters
> more to me is how much allocation work has to be done.  When working with
> very large graphics data sets, and changing values with each iteration of
> the scene clock, there are often significant performance enhancements to be
> gained by minimizing the number of new memory allocations, assignments,
> etc. that need to be made.  I'm trying to get an idea of what happens when
> I recreate graphics primitives. Currently, the only way I know to change
> the location of a primitive is to create a new one, and assign it to the
> original variable.
 >
 ><snip>
> 
> I guess the essence of my original question is: how expensive is this
> garbage production and recycling?

I'll be curious to hear an authoritative answer. My experience is 
Mathematica only garbage collects when you hold a gun to its head. You 
can fire up an interative routine that repeatedly overwrites an existing 
variable's values, and watch the memory that the kernel uses climb and 
climb and climb. This after exhausting all of the memory tricks 
advocated, such as using a short history, using share, and so on.


  • Prev by Date: Re: Mathematica 5 : strange Plot
  • Next by Date: RE: Mathematica 5 : strange Plot
  • Previous by thread: Re: What Happens to Garbage in Mathematica?
  • Next by thread: Re: What Happens to Garbage in Mathematica?