allow LinuxThreads to have larger stacks for the mainthread

Kaz Kylheku kaz@ashi.footprints.net
Thu Jun 26 18:40:00 GMT 2003


On 26 Jun 2003, Wolfram Gloger wrote:

> > This is not usable.  Many architectures severely limit the stack size.
> > On x86 there is a hard limit of 8MB.  The remaining 120MB would be
> > unused, or worse, used for other mappings.
> 
> Ok, can someone explain to me that hard limit of 8MB on x86?  I wasn't
> aware of it at all.  Is this built into LinuxThreads in some other
> place, or is it a kernel limitation?

It's a default value in the kernel determined by compile-time constant.
You can raise the stack size for a process and its chilren.

Of course LinuxThreads manages its own stacks for threads which are
even smaller; this is the normal process stack we are talking about
that the kernel sets up.

To get thread stacks larger than 2 megs, you can allocate your own
stacks and set them up at thread creation time via the attribute
mechanism.



More information about the Libc-alpha mailing list