4 ms·
x32 isn't i386. It's x86_64 with truncated pointers. There aren't many syscalls that return pointers; mmap() is one of them, and using MAP_32BIT means that the
by geocar 8y ago
x32 isn't i386. It's x86_64 with truncated pointers.
There aren't many syscalls that return pointers; mmap() is one of them, and using MAP_32BIT means that the pointer will be 32-bit.
- AstralStorm 8y agoBut the offset still is 64bit right? (As per large file support)
- walkingolof 8y agoDepends, the offset is a size_t, i.e. and unsigned integer, so if you compile the program as a 64 bit binary, its 64 bit, 32 bit otherwise.
- jabl 8y agoX32 has it's own (partial) set of syscalls. Similar to how a x86-64 kernel ran run traditional x86-32 code. 32-bit code tells the kernel to allocate in the lower 32-bit address space (via MAP_32BIT) precisely so that the 64-bit pointers the kernel works with can be safely truncated to 32-bit user space pointers.