[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/3] Use mmap() within code_gen_alloc() for Open

From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 3/3] Use mmap() within code_gen_alloc() for OpenBSD.
Date: Tue, 21 Dec 2010 14:05:31 +0100

Am 21.12.2010 um 03:25 schrieb Brad:

Signed-off-by: Brad Smith <address@hidden>

exec.c |    3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/exec.c b/exec.c
index 42a35e0..e513d16 100644
--- a/exec.c
+++ b/exec.c
@@ -517,7 +517,8 @@ static void code_gen_alloc(unsigned long tb_size)
-#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
+    || defined(__DragonFly__) || defined(__OpenBSD__)

Brad, thanks for making me aware of this part of code! Haiku is not handled here either, falling back to malloc(), which breaks there.

When using mmap() on Haiku, weird qemu_malloc() workarounds with BeOS areas are no longer necessary.

As for a fix, shouldn't we do this the autoconf way and do feature tests rather than testing for known platforms? I.e. #elif defined(HAVE_MMAP) with HAVE_MMAP getting defined by configure?


        int flags;
        void *addr = NULL;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]