[PATCH] Dynamic thread stack size

Daniel Eischen deischen at freebsd.org
Mon Jan 24 11:31:37 PST 2005


On Mon, 24 Jan 2005, Joe Marcus Clarke wrote:

> On Sat, 2005-01-22 at 13:03 -0500, Daniel Eischen wrote:
> > On Fri, 21 Jan 2005, Joe Marcus Clarke wrote:
> >
> > > In a follow-up to the previous discussion on increasing our default
> > > thread stacksize, I thought I'd look at how some other BSD
> > > implementations do it.  Mezz mentioned that he thought NetBSD had a 2 MB
> > > default stacksize, so I took a look.
> > >
> > > What I found was that NetBSD doesn't have a static default stacksize.
> > > Instead, they use the stacksize rlimit and a PTHREAD_STACKSIZE
> > > environment variable to get both the initial stacksize as well as each
> > > thread's default stacksize.  I thought this would be a really good way
> > > of doing things, so I ported their work to FreeBSD.
> >
> > Please no.  I don't want to have to set any more environment
> > variables or login defaults to get libpthread to work with
> > certain ports.
>
> No need.  The default stacksize rlimit is more than enough (64 MB) to
> satisfy every one of the affected ports thus far.  The environment

And 64MB is way too big for a default stack size...

-- 
DE



More information about the freebsd-threads mailing list