Re: Thread stack management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 08, 2007 at 14:38:34 -0800, Max rumi wrote:
> What is the size of each user thread that gets created in Linux? I remember it used to be 2MB for each thread created beyond the main thread, actually Linux used mmap to reserve 2MB of linear space in the address space of the process and then memory was allocated as needed.  But recently when I wrote a program with a couple of threads created by the pthread library and checked the memory space of the process with pmap and /proc/pid/maps, I noticed that 10M of space was created for each thread's stack. 
>    
>   Has something changed and the thread stack space has increased from 2M to 10M?

You should better ask on the glibc mailing list.

This has nothing at all to do with kernel -- the clone syscall simply takes
a stack pointer; libpthread is responsible for allocating it.

-- 
						 Jan 'Bulb' Hudec <bulb@xxxxxx>

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux