pthread_create oddity

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Mon Aug 10 12:01:22 PDT 2015


On 8/8/15 8:40 AM, Andrei Alexandrescu wrote:

> pthread_getstacksize indicates 8,388,608 bytes. It doesn't seem
> excessive, but the 32-bit build does find that too big. If I try to set
> stack size to that value with pthread_setstacksize, indeed the thread
> fails. So it's not that you need to call pthread_setstacksize, you need
> to call it with a smaller value. -- Andrei

Does the failure always happen with any thread create? Or only after you 
have created X threads?

8MB doesn't seem like that much, but if you created 100 threads at 8MB a 
piece...

What about an equivalent C program? something doesn't seem right when 
the default value isn't working...

-Steve


More information about the Digitalmars-d mailing list