3 ms·
The address space size limitations doesn't mean that only the least significants bits are used, the memory hole is in the middle of the address space[1]. I don
by 4ad 2y ago
The address space size limitations doesn't mean that only the least significants bits are used, the memory hole is in the middle of the address space[1].
I don't know what Linux does specifically (or under what configurations), but one some other operating systems the user space stack is in the higher half[2].
[1] https://en.wikipedia.org/wiki/X86-64#Canonical_form_addresses https://en.wikipedia.org/wiki/X86-64#Canonical_form_addresse...
[2] https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/i86pc/os/startup.c#L408-L475 https://github.com/illumos/illumos-gate/blob/master/usr/src/...