From faa3052b28e1270ddc85791dad919ea1b3bd7c8d Mon Sep 17 00:00:00 2001 From: Dain Date: Mon, 14 Jan 2008 09:33:54 -0700 Subject: [PATCH] set MAP_32BIT for 32bit machines --- src/posix.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/posix.cpp b/src/posix.cpp index 3bb35fcd38..7d743d6b7e 100644 --- a/src/posix.cpp +++ b/src/posix.cpp @@ -503,6 +503,10 @@ class MySystem: public System { virtual void* tryAllocate(unsigned size, bool executable) { assert(this, (not executable) or (size % LikelyPageSizeInBytes == 0)); +#ifndef MAP_32BIT +#define MAP_32BIT 0 +#endif + if (executable) { void* p = mmap(0, size, PROT_EXEC | PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_32BIT, -1, 0);