On Wed, 17 Nov 1999 [EMAIL PROTECTED] wrote:

> It's been rumoured that Rafael Marco de Lucas said:
> > 
> > 
> >     Hello, i found that the following program gives an error, why ?
> >  is there any limit in the size of variables ?
[...]
> jaja stits on the stack, not the heap.  
Yes.
 
> You need to increase the size of your stack space with teh 'ulimit'
> command.   It's also possible that the sysadmin set a hard limit 
> at 8meg or 24 meg. in which case you need the sysadmins help to raise
> it.

Last time I looked, there was a hard stack limit of 8MB HARDWIRED INTO THE
KERNEL SOURCE.

Now, in my own long-running scientific computations, I use the stack as
much as possible to avoid heap fragmentation when the program is about to
run a month or so allocating and deallocating many temporary vars of
varying types.
Normally my code is not deeply recursively nested though.

As I suspect there are in addition many people with deeply recursive code
too, I always found the 8MB limit quite ridiculous.

As I don't do my computations on linux, I was not yet forced much to raise
the stack limit, so my question(s) [I found no comments about these in the
source]: 

Is there any good reason for the 8MB limit? Is it configurable somehow
(in more decent versions, when I looked it even was no #define as far as I
remember) ? Or is this just laziness and noone ever cared to raise the
(hardwired) limit?

AFAIK there was also code missing to lower the preset 8MB stack limit even
more. (might become important if max stacksize becomes something sensible
like 2GB)

Michael.

--

Michael Weller: [EMAIL PROTECTED], [EMAIL PROTECTED],
or even [EMAIL PROTECTED] If you encounter an eowmob account on
any machine in the net, it's very likely it's me.

Reply via email to