This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: allow LinuxThreads to have larger stacksfor the mainthread
> > 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.
Ok, so you mean _STK_LIM from include/linux/sched.h?
That is not a hard limit, root can raise it.
> 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.
Yep, and I maintain my patch does the right thing: only if the user
has managed to raise her stack rlimit, the bottom of the normal
process stack is set up differently.
> 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.
Yes, I know. Still I find this unecessarily awkward and it makes
every THREAD_SELF call a lot slower if user-defined stacks are used.
Regards,
Wolfram.