32 bit malloc on x86_64

Carlos O'Donell carlos@systemhalted.org
Tue Jul 8 15:03:00 GMT 2008

On Mon, Jul 7, 2008 at 12:49 PM, Jeremy Sanders <jss@ast.cam.ac.uk> wrote:
> I have come up with a workaround, which is to use mmap myself to allocate
> the memory with the MAP_32BIT flag. This appears to work okay in test I have
> done, but it is a pain as I have to keep track of the allocated length for
> munmap. I read that MAP_32BIT really only gives you 31 bits of memory, but
> this program doesn't use huge amounts of memory.
> Is this a sensible way to proceed?

It seems perfectly sensible. Why is this a pain? Isn't it only one
mmap, and at program exit one munmap?


More information about the Libc-help mailing list