Total stack sizes of threads in one process
- by David
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)?