MathGroup Archive 2011

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

Search the Archive

Re: Memory leak or flawed garbage collector

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120840] Re: Memory leak or flawed garbage collector
  • From: "Oleksandr Rasputinov" <oleksandr_rasputinov at hmamail.com>
  • Date: Fri, 12 Aug 2011 05:06:19 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <j0u7mo$fc1$1@smc.vnet.net> <j10l01$os6$1@smc.vnet.net>

On Thu, 11 Aug 2011 10:19:46 +0100, Alexey Popkov <lehin.p at gmail.com>  
wrote:

> There is another old bug with non-deleting unreferenced Module variables
> after Part assignments to them in v.5.2 which is not completely fixed  
> even
> in version 7.0.1:
>
> In[1]:= $HistoryLength=0;$Version
> Module[{L=Array[0&,10^7]},L[[#]]++&/@Range[100];];
> Names["L$*"]
> ByteCount@Symbol@#&/@Names["L$*"]
> Out[1]= 7.0 for Microsoft Windows (32-bit) (February 18, 2009)
> Out[3]= {L$111}
> Out[4]= {40000084}
>
> Ref.: http://forums.wolfram.com/mathgroup/archive/2006/Mar/msg00170.html
>

Nor in 8.0.1, for that matter. It seems that there may be quite a number  
of corner cases in which either references are not counted correctly or  
hidden references are created that inhibit garbage collection. At least, I  
can't think of any connection between immediate part assignments and  
delayed OwnValue assignments to Temporary symbols that would explain the  
similarly erroneous behaviour observed in these two cases.




  • Prev by Date: Re: Just another Mathematica "Gotcha"
  • Next by Date: Re: Just another Mathematica "Gotcha"
  • Previous by thread: Re: Memory leak or flawed garbage collector
  • Next by thread: Re: Why won't this sum evaluate?