This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: 32 bit malloc on x86_64
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: "Jeremy Sanders" <jss at ast dot cam dot ac dot uk>
- Cc: libc-help at sourceware dot org
- Date: Tue, 8 Jul 2008 11:02:59 -0400
- Subject: Re: 32 bit malloc on x86_64
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=qyV6gp9kK503YKtQNT5JLa8HrBFT+BN3N+ozpTaIoyk=; b=NICZVIp+lJYCsKEoD0YkfMp5Mee9LIBcYFP5mpCljbsb+PVJ5qjm71wpT/Wrp/joAB JCbox4qSOqyZs3LiPJmzvd2N72zuC9RPs7bUzL8SshDIA3qZBWpXLnUM6OqZ4fKrSikv QUSiqDS5CCpU/j0p4AdqSK5w2PUry04zXw1e8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=AOQgwirS9CNLDg0tJkoGf99EoJzpdkrptokKlsu6ypx7X3a2sKDU7nKL5IygfkDdb4 TBWAwQ7laENnRtFghWiFnqiWwkTeK/zdEA2alN8V0L/Rn7TZGOBKa+JhNctgKjA3qkr5 +eNLL0pPe2OuyXjTOLJZavhfmmYe0pbBZN3iw=
- References: <alpine.LFD.1.10.0807071738070.10528@xpc17.ast.cam.ac.uk>
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.