summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
Diffstat (limited to 'rts')
-rw-r--r--rts/posix/OSMem.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/rts/posix/OSMem.c b/rts/posix/OSMem.c
index 274d5ada73..60e684fa34 100644
--- a/rts/posix/OSMem.c
+++ b/rts/posix/OSMem.c
@@ -151,7 +151,14 @@ my_mmap (void *addr, W_ size, int operation)
else
prot = PROT_NONE;
if (operation == MEM_RESERVE)
+# if defined(MAP_NORESERVE)
flags = MAP_NORESERVE;
+# else
+# ifdef USE_LARGE_ADDRESS_SPACE
+# error USE_LARGE_ADDRESS_SPACE needs MAP_NORESERVE
+# endif
+ errorBelch("my_mmap(,,MEM_RESERVE) not supported on this platform");
+# endif
else if (operation == MEM_COMMIT)
flags = MAP_FIXED;
else