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.
Posted Jun 20, 2017 6:39 UTC (Tue)
by thestinger (guest, #91827)
[Link]
Maximum number of threads
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.