linux 进程的内存布局

linux的进程有2种memory region layout:
1.classic layout
2.flexible layout
见<understanding the linux kernel>-819页
type of memory regionclassic layout flexible layout
text segment(elf) start from 0x08048000
data and bss segments start right after text
heapstart right afte the data and bss

file memory mapping and start from 0x40000000|starts near the end of the anonymous memory regions libraries added at successive |user mode

higter address| stack;libraries added

at successive lower

address
user mode stack start at 0xc0000000 and grows towards lower address

class layout的缺点在于heap的大小不能超过1g,flexible layout的缺点在于必须要知道stack使用的最大大小。
2009/02/15 日

你可能感兴趣的:(linux)