64位Linux中的内核占用了哪个地址空间?

时间:2021-12-24 02:12:05

What is the address space of the kernel for 64 bit Linux, that is, what is the address range of the code, stack, heap and data segments used by it.

64位Linux内核的地址空间是多少,也就是说,它使用的代码,堆栈,堆和数据段的地址范围是多少。

2 个解决方案

#1


13  

On a 64-bit Linux all 64-bit addresses with the highest order bit set to 1 are reserved for the kernel. In other words, the top half of the virtual address space.

在64位Linux上,所有最高位设置为1的64位地址都保留给内核。换句话说,虚拟地址空间的上半部分。

For full details see http://en.wikipedia.org/wiki/X86-64#Virtual_address_space_details

有关详细信息,请参阅http://en.wikipedia.org/wiki/X86-64#Virtual_address_space_details

#2


1  

PAGE_OFFSET and ULLONG_MAX are constants with values that are equal to the start and end addresses of the kernel memory. You can use them directly in your kernel C module:

PAGE_OFFSET和ULLONG_MAX是常量,其值等于内核内存的起始和结束地址。您可以直接在内核C模块中使用它们:

#define START_MEM   PAGE_OFFSET
#define END_MEM     ULLONG_MAX

#1


13  

On a 64-bit Linux all 64-bit addresses with the highest order bit set to 1 are reserved for the kernel. In other words, the top half of the virtual address space.

在64位Linux上,所有最高位设置为1的64位地址都保留给内核。换句话说,虚拟地址空间的上半部分。

For full details see http://en.wikipedia.org/wiki/X86-64#Virtual_address_space_details

有关详细信息,请参阅http://en.wikipedia.org/wiki/X86-64#Virtual_address_space_details

#2


1  

PAGE_OFFSET and ULLONG_MAX are constants with values that are equal to the start and end addresses of the kernel memory. You can use them directly in your kernel C module:

PAGE_OFFSET和ULLONG_MAX是常量,其值等于内核内存的起始和结束地址。您可以直接在内核C模块中使用它们:

#define START_MEM   PAGE_OFFSET
#define END_MEM     ULLONG_MAX