About memory ing

Source: Internet
Author: User
For more information about memory ing-general Linux technology-Linux programming and kernel, see the following. Linux uses a 4 kb memory page size (the CPU can be set to 4 kb or 4 MB ). The actual physical memory is divided into 4 kb Memory page frames. Each page frame should have a 32-byte page struct in the memory. In Linux, a page struct actually represents a physical page frame. Each valid (mapped) linear address is mapped to a corresponding page struct. However, the linear address space of the kernel is only 1 GB, and the real physical address can be as large as 4 GB. Therefore, there is no way to match the linear address with the actual physical address one by one. Therefore, a portion of the 1 GB linear address space (896 MB, Low Memory) of the kernel is directly mapped to the physical address, that is, the kernel space from 0xc0000000 to 0xffffffff-128M, however, the physical memory is not necessarily allocated after being mapped. If the physical memory is not allocated by the kernel, it can be allocated by the user process. This page is also mapped by the kernel to the user.

The Kernel linear space is 128 MB (kernel Virtual Address) left for Memory (High Memory) mapped to more than MB. The kernel maps physical memory of more than MB to the linear address space of MB through three different methods (permanent kernel mapping, temporary kernel mapping, and noncontiguous memory allocation ), for specific implementation methods, see Chapter 8 of ULK3.

Supplement: The address space allocated by the kernel to itself is 0xc0000000 to 0 xffffffff, a total of 1 GB space, 1 GB mapped to the physical memory, and the address kernel larger than 1 GB cannot be accessed, user space ing is second-level ing, so it is accessible.

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.