40061000 8188K rwxp 00001000 00:00 [ anon ]
Where is the decision of the stack size made? In the linuxthreads library or in the kernel? I have yet to find that code in the kernel
and do not understand why an 8 Meg stack would be created when using non-detached threads.
Thanks,
Anton
patrick mcmanus wrote:
On Fri, 2004-08-27 at 17:10, anton wilson wrote:
in OUTPUT1. When pthread_create is used, several unexplained memory[..]
one is 4k (non-writable) and the other is 2044K (both mapped to the zero
I don't recall what all of the allocations are for, but the 2MB is the stack for your new thread. See pthread_attr_setstackaddr() and pthread_attr_setstacksize() for controlling it a bit.
-Pat
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/