您的位置:首页 > 运维架构 > Linux

Good material for understanding linux memory management

2015-03-25 17:15 519 查看
https://techtalk.intersec.com/2013/07/memory-part-1-memory-types/

Key concepts:

We can classify it through two axis: the first axis is whether memory is private (specific to that process) or shared, the second
axis is whether the memory is file-backed or not (in which case it is said the be anonymous).
 PrivateShared
Anonymous1

stack
malloc()
mmap(ANON, PRIVATE)
brk()/sbrk()

1
2
3
4

stack

malloc()
mmap(ANON, PRIVATE)

brk()/sbrk()

2 

mmap(ANON, SHARED)

1

mmap(ANON, SHARED)

File-Backed3

mmap(fd, PRIVATE)
binary/shared libraries

1
2

mmap(fd, PRIVATE)

binary/shared libraries

4

mmap(fd, SHARED)

1

mmap(fd, SHARED)

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  linux malloc