|
 |
>> One thing I discovered back at uni: If your Java program accidentally
>> goes into an infinite loop, it dies almost instantly with a stack
>> overflow.
>
> That's just because the VM only claims a small amount of RAM to start with...
> quite irritating actually, it took me ages to work out I had to increase its
> allocation to get my fractal plotter to be able to hold a decent image :-)
>
> (but then it was too slow anyway so I rewrote it in C)
Actually, I think this is probably bogus.
Any object data goes in the heap, not the stack. A *stack* overflow
indicates a sequence of method calls nested too deeply.
Heck, Haskell programs (more exactly, GHC-compiled Haskell programs)
often die from a *stack* overflow very quickly. But they don't die from
*heap* exhaustion (unless you set the magic flag).
Post a reply to this message
|
 |