|
|
Subscribe / Log in / New account

Maximum number of threads

Maximum number of threads

Posted Jun 20, 2017 5:34 UTC (Tue) by flussence (guest, #85566)
In reply to: Maximum number of threads by ikm
Parent article: Preventing stack guard-page hopping

32-bit glibc gives each thread a whopping 2MB stack by default (per `man pthread_create`), so you'll run out of address space long before then.


to post comments

Maximum number of threads

Posted Jun 20, 2017 6:39 UTC (Tue) by thestinger (guest, #91827) [Link]

It only uses that 2M value if the stack rlimit is set to unlimited. Secondary stack size is usually 8M because the rlimit for the main thread stack is usually 8M, not unlimited.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds