MathGroup Archive 2004

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

Search the Archive

Re: Re: No more memory available

  • To: mathgroup at
  • Subject: [mg51201] Re: [mg51165] Re: No more memory available
  • From: János <janos.lobb at>
  • Date: Fri, 8 Oct 2004 02:54:49 -0400 (EDT)
  • References: <ck0bht$ns5$> <>
  • Sender: owner-wri-mathgroup at

It is stack={{{{{},d},c},b},a}.

In the meantime I measured the depth of the stack and it is normal, I 
mean it is mostly below 100 during a run. So, I was wrong in my 
assumption that my stack is getting too deep.   My apology...   I ran 
out of memory, because the results - different length of strings - I 
collect in a simple list is getting too big.
I will try to compress or pack them before I add them to the list.

In the meantime as I investigated the Depth[of different objects], I 
found that I can crash the kernel with no exception on both of my 
machines with the following one liner:

Depth[Fold[List, "", Table["", {i, 87363}]]]

I looked the Book, but found no limit on nesting other than 
$RecursionLimit, but that one does not apply here looks like anyway.  
So the biggest depth an object can have without crashing the kernel in 
5.0.1 is 87361.  Interestingly it is a multiplicand of two primes 199 
and 439.

Thanks a lot,


On Oct 7, 2004, at 5:25 AM, Jens-Peer Kuska wrote:

> Hi,
> what do you use as stack, a simple list or a folded list, i.e.,
> $stack={a,b,c,d}
> or
> $stack={a,{b,{c,{d,{}}}}}
> ??
> Regards
>   Jens
> "János" <janos.lobb at> schrieb im Newsbeitrag
> news:ck0bht$ns5$1 at
>> Hi,
>> In a loop I am pushing data on a stack and popping it later.  In the
>> first part of the calculation I push more than I pop and it eats up 
>> all
>> the physical memory, and eats also up all the virtual memory available
>> for the App.
>> No more memory available.
>> Mathematica kernel has shut down.
>> Try quitting other applications and then retry.
>> It is with OSX 10.3.5 and Mathematica 5.0.1 on a G4 with 2GB SDRAM.  I
>> am wondering what technics are used by others in similar situation.  
>> Do
>> you start to write out to the file system your accumulated unprocessed
>> data and read it back later for further processing ?
>> Theoretically I can re-arrange the program so after some amount of
>> push, pop all which was pushed and process them before I push more, 
>> but
>> that requires some rearrangement of the flow of computation and I try
>> to avoid that.
>> I also found Utilities`MemoryConserve` which I will try out.  Any 
>> other
>> suggestions ?
>> Thanks ahead,
>> János
>> ------
>> "..because Annushka has already bought sunflower oil, and not only
>> bought it, but spilled it too."
>> Bulgakov:  Master and Margarita
Trying to argue with a politician is like lifting up the head of a 
(S. Lem: His Master Voice)

  • Prev by Date: Re: Problem with Maximize and conditions.
  • Next by Date: Re: Re: Conveniently Restarting Notebooks
  • Previous by thread: Re: No more memory available
  • Next by thread: Re: Re: Re: No more memory available