This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 32 bit malloc on x86_64


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?

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]