Total stack sizes of threads in one process
Posted
by David
on Stack Overflow
See other posts from Stack Overflow
or by David
Published on 2010-05-20T03:30:27Z
Indexed on
2010/05/20
4:10 UTC
Read the original article
Hit count: 379
I use pthreads_attr_getthreadsizes() to get default stack size of one thread, 8MB on my machine.
But when I create 8 threads and allocate a very large stack size to them, say hundreds of MB, the program crash.
So, I guess, shall ("Number of threads" x "stack size of per thread") shall less than a value(virtual memory size)?
© Stack Overflow or respective owner