High-end memory and low-end memory

Source: Internet
Author: User

Reference: http://blog.csdn.net/ghosc/article/details/6625277

High-end memory is an important concept in Linux, a concept that was very confusing when it came to Linux. In fact, this concept is relatively simple, to understand the concept, it is necessary to trace the memory management of Linux

Once upon a time, the CPU's address bus was only 32 bits long and no longer traced back. 32 address bus either from the logical mulberry or physically can only describe the 4G address space, in the physical theory of up to 4G memory (in addition to the IO address space, the actual memory capacity is less than 4G), logical space can only describe the linear address space 4G. In order to make reasonable use of 4G space, Linux adopts 3:1 strategy, that is, the kernel occupies 1G linear address space, the user occupies 3G linear address space. So the address range of the user process from 0~3g, the kernel address range from 3g~4g, that is, kernel space can only manage 1G of memory.

For such a tense linear address resource, the arbitrary partition of kernel space and user space leads to the memory management problem: When the physical memory is greater than 1G, the kernel linear address space is less than the actual physical memory space, how does the kernel implement the management of more than 1G memory? In this case, you need to mention the kernel space-to-memory management method. On the one hand, in order to improve the management efficiency of kernel space to memory, on the other hand, in order to simplify the kernel space memory management method, the kernel uses the linear mapping method to realize the memory management , from the Linux implementation method, the physical address and the kernel's virtual address is only an offset. Therefore, when physical memory is greater than 1G, physical memory does not fully map to the kernel linear address space, which creates the problem.

As can be seen from the above description, the address space greater than 1G of memory area called the address space, in the same vein, less than 1G of memory area called low-end memory.

The management of high-end memory requires a non-linear mapping, for which a 128M space is reserved in the kernel linear address space, at the high end of the linear address space.

Today, the address bus of the CPU expands to 64 bits, the linear address resource is very rich, so, can give the kernel space to reserve enough linear address resource, in the most recent time, the contradiction between the kernel linear address resource and the physical memory capacity is no longer outstanding, the concept of high-end memory disappears on the 64-bit CPU

High-end memory and low-end memory

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.