MathGroup Archive 2007

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

Search the Archive

Re: Re: memory release problem in mathematica6.0

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83288] Re: [mg83212] Re: memory release problem in mathematica6.0
  • From: Carl Woll <carlw at wolfram.com>
  • Date: Sat, 17 Nov 2007 05:11:08 -0500 (EST)
  • References: <fhegac$m08$1@smc.vnet.net> <200711151035.FAA08946@smc.vnet.net>

Yaroslav Bulatov wrote:

>I confirm this behavior. The following line works the first few times,
>but the memory isn't released with "Clear[A]" and after a few times
>kernel quits with "out of memory" message
>
>A = RandomInteger[{1}, 100000000]; Clear[A]
>  
>
The reason you get an "out of memory" message is because your history of 
outputs is not getting cleared. A line like:

expr; Null

stores expr as the value for Out[]. For example:

In[1]:= A = {1, 1}; Clear[A]

In[2]:= %

Out[2]= {1,1}

So, running your code several times causes the ByteCount of Out to blow 
up. To avoid an "out of memory" message, either Clear[Out] as well, or 
set the history length:

$HistoryLength=0

Carl Woll
Wolfram Research

>On Nov 14, 1:49 am, jack <giaber... at gmail.com> wrote:
>  
>
>>Hi all,
>>When i define large data structures, for example an array  "A" of
>>million  of elements that occupy some  hundreds of MB of physical
>>memory,when i clear it, with Clear[A] memory isn' t released by
>>operating system. I' ve tried both on windows and linux.
>>The result of MemoryInUse[] command of mathematica but the physical
>>memory reported by the system monitor isn't released.
>>I' ve tried also ClearSystemCache[] but with no result.
>>Am i missing something?
>>
>>Thanks!
>>    
>>
>
>
>  
>



  • Prev by Date: Trouble with Rotate
  • Next by Date: Re: RegionPlot ignores the AxesLabel Option?
  • Previous by thread: Re: memory release problem in mathematica6.0
  • Next by thread: Re: memory release problem in mathematica6.0