On Wed, Jul 09, 2014 at 11:54:38PM -0600, Eric Smith wrote:
[...]
Short of writing a specialized device driver to
allocate the memory and allow
it to be mmap()ed and munmap()ed, I think the closest 32-bit Linux equivalent
to Microsoft's Address Windowing Extensions (AWE) API would be to use mmap()
and munmap() on a non-disk-backed file larger than 4GB, such as a file in a
tmpfs filesystem.
Exactly.
creat() a file in /dev/shm, unlink() it (so the storage is released when your
process exits) then ftruncate() it to the desired length. Use MAP_FIXED to
overlay a mapping at a different offset over the top of an existing one, thus
providing the same results as banked memory.