Linux _ virtual address, physical address, and logical address

Source: Internet
Author: User

User Virtual addresses

This is the user Program Common address. The user address is 32-bit or 64-bit in length. It depends on the underlying hardware structure and each process has its own virtual address space.
Physical addresses
The address used between the processor and the system memory. The physical address is 32-or 64-bit; or even 32-bit systems can use a larger value in some cases.
Physical address.
Bus addresses
Addresses used between peripherals and memory. Often, they are the same as physical addresses used by processors, but this is not necessary. Some systems can
Provides an I/O Memory Management Unit (iommu), which remaps addresses between the bus and the main memory. An iommu can be used in many ways
Simple (for example, caching distributed in the memory seems to be continuous to the device, for example), but programming iommu is
Additional steps are required. The bus address is highly dependent on features, of course.
Kernel logical addresses
These constitute a normal kernel address space. These addresses map some (maybe all) primary memory and are often treated as physical memory.
In most systems, there is only one constant offset between the logical address and its physical address. The logical address uses the local pointer size of the hardware and
Therefore, you may not be able to address all physical memory on a 32-bit system with heavy equipment. Logical addresses are often stored in unsigned long or void *
Type variable. The memory returned from kmalloc has the kernel logic address.
Kernel virtual addresses
Kernel virtual addresses are similar to logical addresses. They are all ing from kernel space addresses to physical addresses. kernel virtual addresses do not have to have logical address space.
Linear, one-to-one physical address ing, but all logical addresses are kernel virtual addresses, but many kernel virtual addresses are not Kernel
For example, the memory allocated by vmalloc has a virtual address (but there is no direct physical ing). The kmap function (described later in this chapter) also returns the virtual address.
Virtual addresses are often stored in Pointer variables.

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.