[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: stack size



++++++++ Lennart Sorensen 09:32 Wed 23 Apr      ++++++++

On Tue, Apr 22, 2008 at 11:57:35PM -0700, Francesco Pietra wrote:

>From that, I extrapolated (now clearly wrongly) that setting stack
>size to unlimited may be beneficial to have all available memory
>used in memory-demanding computation.

Well the stack is only used for passing arguments to functions and for
local variables in a function.  Most large chunks of data are allocated
using malloc which means it comes from the heap, not the stack.

It takes a rather badly designed program to use 8MB of stack space.

I've seen that in geographical information software (GIS), too.
Something like 32Mb of stack needed.

But when you think about it, isn't stack easier to maintain?  <grin>

--
<Knghtbrd> "The currency collectors are offline."  "I'm rerouting though
           the secondary couplings.  If we re-align the phase manifold we
           should be able to use the plasma inductor matrix to manually
           launch a new cheesy spinoff series."
* ShadwDrgn sighs
<Phase> you leave my manifolds alone
<Phase> !


Reply to: