Linux Kernel memory management subsystem analysis "Go"

Source: Internet
Author: User

This article was reproduced from: http://blog.csdn.net/coding__madman/article/details/51298718

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Or the familiar old Picture: Introduction to the Linux kernel subsystem (consisting of seven parts)

Linux Memory Management model:

1. Memory Pipe system function:

1> managing the mapping of virtual addresses to physical addresses

2> managing the allocation of physical memory

2. Address Mapping Management

1> Virtual address space distribution:

Linux uses a virtual address management method, for a 32-bit processor for the memory space of 4G, where 0 to 3g is the user space, from 3G to 4 G is the kernel space, and the kernel space from which can be seen to be divided into four parts: direct mapping area, Vmalloc Zone, Permanent mapping zone, and fixed mapping area

2> virtual address into physical address:

How a 32-bit virtual address is converted to a physical address: the first step is to take the high 10 bits of the virtual address as an offset, and the CR3 register as a base address, to see what it means. Add to the page directory to get an address, this address will point to a page table, the base address of the page table and the middle of the 10-bit can get the base of the physical page, and then the offset in the page, that is, low 12 bits, you get the actual physical address!

More than 896M of memory is called high-end memory, 896M of memory is called low-end memory!

3. Physical memory allocation

Linux Kernel memory management subsystem analysis "Go"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.