This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: allow LinuxThreads to have larger stacksfor the mainthread


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]