Constant ostd::mm::MAX_USERSPACE_VADDR

source ·
pub const MAX_USERSPACE_VADDR: Vaddr = _; // 140_737_488_351_232usize
Expand description

The maximum virtual address of user space (non inclusive).

Typicall 64-bit systems have at least 48-bit virtual address space. A typical way to reserve half of the address space for the kernel is to use the highest 48-bit virtual address space.

Also, the top page is not regarded as usable since it’s a workaround for some x86_64 CPUs’ bugs. See https://github.com/torvalds/linux/blob/480e035fc4c714fb5536e64ab9db04fedc89e910/arch/x86/include/asm/page_64.h#L68-L78 for the rationale.