On Sat, 2006-09-09 at 23:47 +0700, Mulyadi Santosa wrote: > Hi Mauricio... > Hi, > > > I think, even the addresses seem equal, physically they are > > > different > > > > > > pages. IMHO this is done so that the kernel doesn't need to > > > "tangle" with SP (stack pointer). > > > > So you are saying that each thread belongs to an application contains > > its own stack in terms of physical pages and not virtual memory, > > right? > > Yes, that's what I meant. The address is still the same, but they use > different physical pages... > ...however that's not what happens in reality. what happens is when you use threads, glibc makes additional stacks in addition to the original one that the kernel made for the process, and the threads start using those. Those stacks aren't marked "stack" in /proc/<pid>/maps and friends, because the kernel doesn't really know that they are stacks. And that is perfectly fine; a "stack" is not something special that the kernel needs to care about. Well not after having set one up that is. Greetings, Arjan van de Ven -- if you want to mail me at work (you don't), use arjan (at) linux.intel.com -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/