[Linux memory]--kernel address space

Source: Internet
Author: User

One, why need high-end memory
A: For a 32-bit machine, the maximum Linux virtual memory is 4G, where 3-4g space is used as the kernel space, considering that if the physical memory is greater than 1G, then the physical memory can not be fully mapped, so Linux rules "kernel Direct mapping Space" mapping 896M physical Memory, ARM architecture has the concept of high-end memory, but not fixed in the area of more than 896M ~

Second, the Linux kernel address space

Linux virtual address 3G to 4G space is the kernel address space, kernel space is the kernel responsible for mapping, he will not follow the process changes, is fixed.

1,3G---3g+896m is a direct mapping area where the linear address and physical address have a linear transition relationship: The linear address =3g+ the physical address.

2,3g+896m---3g+896m+120m is a dynamic memory mapping area, which is allocated by the kernel function Vmalloc, characterized by: linear space continuous, but the corresponding physical space is not necessarily continuous. The physical page that corresponds to the linear address assigned by the Vmalloc may be in low-end memory or high-end memory.

3, the next 4M is the permanent memory-mapped area, which accesses high-end memory. The access method is to use Alloc_page (_GFP_HIGHMEM) to allocate high-end memory pages or to map high-end memory allocated to the zone using the Kmap function. 4, the final 4M is a fixed mapping area, the region and 4G at the top of the 4k barrier, each of its address items to serve a specific purpose, such as acpi_base, etc.

Note: The above values are not fixed and may be different on different platforms or on different implementations.

Error Value (1 page)
Vector table (4 K)
Fixaddr_start
IO map Space
Vmalloc Space
Vmalloc_offset
Low Memory
Manager SYS Buffer
Padding
. Data. BSS
. text
. init data
Pgd
Boot parameters
Pkmap_base
*.ko
User space

[Linux memory]--kernel address space

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.