Why is the default stack size no longer 2M after porting our application from LinuxThreads to NPTL?

Updated -

The default stack size, unless overwritten by pthread_attr_setstacksize(), depends on the resource limit (i.e. rlimit), and it is platform specific. The default on x86 is 10M.

$ ulimit -a | grep stack
stack size (kbytes, -s) 10240

If the rlimit is unlimited, use an architecture-specific default. For x86, this is 2M.

$ ulim...

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In