From 0c7c5fbd7b7e15a74d61f0b8b83ffbd7b2e1bff9 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Sun, 31 Aug 2025 00:27:01 +0200 Subject: [PATCH] Update MAP_ANONYMOUS for Linux --- lib/std/os/posix/mman.c3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/std/os/posix/mman.c3 b/lib/std/os/posix/mman.c3 index 53cdf43cf..a0e72b480 100644 --- a/lib/std/os/posix/mman.c3 +++ b/lib/std/os/posix/mman.c3 @@ -11,7 +11,8 @@ const MAP_SHARED = 0x0001; // share changes const MAP_PRIVATE = 0x0002; // changes are private const MAP_FILE = 0x0000; // map from file (default) -const MAP_ANONYMOUS = 0x1000; // allocated from memory, swap space + +const MAP_ANONYMOUS = env::LINUX ??? 0x20 : 0x1000; // allocated from memory, swap space const void* MAP_FAILED = (void *)(uptr)-1; // mmap failed const MADV_NORMAL = 0; // no further special treatment