Index: /trunk/src/VBox/Runtime/r3/posix/alloc-posix.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/posix/alloc-posix.cpp	(revision 340)
+++ /trunk/src/VBox/Runtime/r3/posix/alloc-posix.cpp	(revision 341)
@@ -47,8 +47,17 @@
 RTDECL(void *) RTMemExecAlloc(size_t cb)
 {
+    AssertMsg(cb, ("Allocating ZERO bytes is really not a good idea! Good luck with the next assertion!\n"));
+
+#if defined(__AMD64__) && defined(__LINUX__)
+    /*
+     * Use mmap to get low memory.
+     */
+    void *pv = mmap(NULL, RT_ALIGN_Z(cb, PAGE_SIZE), PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANONYMOUS | MAP_32BIT, -1, 0);
+    AssertMsgReturn(pv != MAP_FAILED, ("errno=%d cb=%#zx\n", errno, cb), NULL);
+
+#else
     /*
      * Allocate first.
      */
-    AssertMsg(cb, ("Allocating ZERO bytes is really not a good idea! Good luck with the next assertion!\n"));
     cb = RT_ALIGN_Z(cb, 32);
     void *pv = NULL;
@@ -75,4 +84,5 @@
         }
     }
+#endif
     return pv;
 }
@@ -87,5 +97,12 @@
 {
     if (pv)
+    {
+#if defined(__AMD64__) && defined(__LINUX__)
+        int rc = munmap(pv, 0);/** @todo fix me! */
+        AssertMsg(!rc, ("munmap -> %d errno=%d\n", rc, errno));
+#else
         free(pv);
+#endif 
+    }
 }
 
