MathGroup Archive 2001

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

Search the Archive

Memory-Unleak! (Was Re: Memory Leak)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30097] Memory-Unleak! (Was Re: [mg30048] Memory Leak)
  • From: "Michael" <michael at science.edu>
  • Date: Sat, 28 Jul 2001 01:50:59 -0400 (EDT)
  • References: <200107250500.BAA08236@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

While this appears to be a memory leak, there appears to be a way to reclaim
more memory than actually leaks!

In[109]:= Share[]
Out[109]= 128

In[110]:= Do[Print[MemoryInUse[ ]]; ListConvolve[{1, 2, 3}, {2, 3, 4}],
{10}]

2759536
2759672
2759696
2759720
2759744
2759768
2759792
2759816
2759840
2759864

In[111]:= Share[]
Out[111]= 1824

In[112]:= MemoryInUse[]
Out[112]= 2759232

The initial Share[] is just to establish a baseline.  Therefore the second
Share[] should only clear up memory from that point on.  As you can see, we
wind up with 304 bytes less used than when we started.

It should be noted that if we repeat the above steps we will probably wind
up taking up more memory than before, but this can be explained by the fact
that our $Out history is increasing in size.

Michael




  • References:
    • Memory Leak
      • From: "Carl K. Woll" <carlw@u.washington.edu>
  • Prev by Date: Re: commands history in notebook
  • Next by Date: Re: commands history in notebook
  • Previous by thread: Memory Leak
  • Next by thread: RE: Memory Leak