2 ms·
From a very cursory look, it seems like it doesn't. Based on the man page for mmap [1], it seems like all MAP_32BIT does is ensure that memory is allocated in t
by rocqua 8y ago
From a very cursory look, it seems like it doesn't. Based on the man page for mmap [1], it seems like all MAP_32BIT does is ensure that memory is allocated in the lower 2GB of addresses.
Notably, this means the actual pointers to that memory are still 64 bit.
Obviously, when you change pointers to be 32 bit, that requires an ABI change because the binary layout of your data structures is different.
http://man7.org/linux/man-pages/man2/mmap.2.html http://man7.org/linux/man-pages/man2/mmap.2.html
- syn0byte 8y agoYou can easily truncate or pad to convert between 64-32bit as long as the 64bit end stays in the lower 2GB. You could do everything else in userspace if you really wanted. At the cost of safety, type handling and optimization from the compiler as all it would see is 64bit pointers being typecast and generic 32bit numeric data. Whatever you were looking to gain would be lost in extra work, and you can forget about debugging. But theoretically...