摘录


What is some existing documentation on Linux memory management?

Ulrich Drepper (the ex-glibc maintainer) wrote an article series called "What every programmer should know about memory":

Part 1: http://lwn.net/Articles/250967/
Part 2: http://lwn.net/Articles/252125/
Part 3: http://lwn.net/Articles/253361/
Part 4: http://lwn.net/Articles/254445/
Part 5: http://lwn.net/Articles/255364/
Part 6: http://lwn.net/Articles/256433/
Part 7: http://lwn.net/Articles/257209/
Part 8: http://lwn.net/Articles/258154/
Part 9: http://lwn.net/Articles/258188/

Mel Gorman's book "Understanding the Linux Virtual Memory Manager" is available online:

http://kernel.org/doc/gorman/

What is virtual memory?

Virtual memory provides a software-controlled set of memory addresses, allowing each process to have its own unique view of a computer's memory.

Virtual addresses only make sense within a given context, such as a specific process. The same virtual address can simultaneously mean different things in different contexts.

Virtual addresses are the size of a CPU register. On 32 bit systems each process has 4 gigabytes of virtual address space all to itself, which is often more memory than the system actually has.

Virtual addresses are interpreted by a processor's Memory Management Unit (mmu), using data structures called page tables which map virtual address ranges to associated content.

Virtual memory is used to implement lazy allocation, swapping, file mapping, copy on write shared memory, defragmentation, and more.

For details, see Ulrich Drepper's "What every programmer should know about memory, Part 3: Virtual Memory":

http://lwn.net/Articles/253361/

点评

这篇把内存管理的最重要的部分给PO出来了。

原文

点击这里查看原文

其它

本帖内容由21QA云收藏工具自动生成,欢迎使用。

系统消息 若觉得内容不错,请点击左上角的"赞"图标,以优化网站的内容呈现。 另外,请及时验证注册邮箱,否则收不到21QA发出的红包。 官方Q群:250203055

asked 14 Oct '16, 15:27

%E8%B7%AF%E4%BA%BA%E7%94%B2's gravatar image

路人甲
131569615789

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link: [text](http://url.com/ "title")
  • image: ![alt](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×877
×325
×3

question asked: 14 Oct '16, 15:27

question was seen: 433 times

last updated: 14 Oct '16, 15:27

powered by O*S*Q*A

粤ICP备14040061号-1