From 5c8849d886cafd1626c1d36c572c3ccee5c88d5d Mon Sep 17 00:00:00 2001 From: Ulrich Hecht Date: Tue, 14 Apr 2009 16:34:05 +0200 Subject: [PATCH 11/33] qemu-cvs-mmap-amd64 Map stuff to address space < 4GB on AMD64. This patch got continually smaller as most cases were this was an issue were dealt with in other ways. May already be fully obsolete. Signed-off-by: Ulrich Hecht --- linux-user/mmap.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index c33e5fe..9ca8f6f 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -31,6 +31,10 @@ #include "qemu.h" #include "qemu-common.h" +#if !defined(MAP_32BIT) +#define MAP_32BIT 0 +#endif + //#define DEBUG_MMAP #if defined(USE_NPTL) @@ -230,7 +234,7 @@ static int mmap_frag(abi_ulong real_start, if (prot1 == 0) { /* no page was there, so we allocate one */ void *p = mmap(host_start, qemu_host_page_size, prot, - flags | MAP_ANONYMOUS, -1, 0); + flags | MAP_ANONYMOUS | MAP_32BIT, -1, 0); if (p == MAP_FAILED) return -1; prot1 = prot; -- 1.6.2.1