简体   繁体   中英

Kernel space and user space virtual address division

Whether the kernel space and user space address ranges are always divided in 1:3 ratio.

example if i have 4gb address space and 4gb physical ram

than kernel gets 1gb and user space gets 3gb (assumed)!

so if i have 2gb ram than is it like the following ?

kernel:512mb user address range:0-1536mb user space ?

is this correct assumption ?

No, the split is only for dividing up the virtual address space.

It just means that the address space from 0x00000000 up to 0xBFFFFFFF 'belongs' to or is available for mapping in user-space. Virtual addresses 0xC0000000 to 0xFFFFFFFF belong to the kernel.

The amount of available RAM and how it is used has nothing to do with how the virtual address space is partitioned in the Linux kernel.

FWIW, on ARM, you can configure what the split is so it doesn't HAVE to be 3:1 (user:kernel). It can be 1:3, 2:2 or 3:1. I'm assuming there is a similar option for the x86 arch.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM