6

pthread stack size

view full story
linux-howto

http://www.linuxquestions.org – Hi, i have an application that launches several pthreads, i know that the default size used by Linux is 8Mb for each pthread. However i would like to optimize the total memory usage by my application by decreasing the default stack size of each pthread to the needed resources. My questions: - Are there any rules to set the pthread stack size. - How to compute the memory needed by each thread. - Is the malloc call inside a thread counted from the stack size of the same pthread? thanks (HowTos)