From b20dd41bec8268644405c1789a2dc20dfdd61d17 Mon Sep 17 00:00:00 2001 From: Max Muoto Date: Sat, 20 Jul 2024 23:38:30 -0500 Subject: [PATCH] Add `MAP_NORESERVE` for Linux (#12385) --- stdlib/@tests/stubtest_allowlists/linux-py313.txt | 1 - stdlib/mmap.pyi | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/stdlib/@tests/stubtest_allowlists/linux-py313.txt b/stdlib/@tests/stubtest_allowlists/linux-py313.txt index e81567635..e76c72d2c 100644 --- a/stdlib/@tests/stubtest_allowlists/linux-py313.txt +++ b/stdlib/@tests/stubtest_allowlists/linux-py313.txt @@ -1,3 +1,2 @@ # TODO: triage these (new in py313) -mmap.MAP_NORESERVE posixpath.splitroot diff --git a/stdlib/mmap.pyi b/stdlib/mmap.pyi index 7ebec003e..a0c150d6e 100644 --- a/stdlib/mmap.pyi +++ b/stdlib/mmap.pyi @@ -128,3 +128,6 @@ if sys.version_info >= (3, 13) and sys.platform == "darwin": MAP_TRANSLATED_ALLOW_EXECUTE: Final = 131072 MAP_UNIX03: Final = 262144 MAP_TPRO: Final = 524288 + +if sys.version_info >= (3, 13) and sys.platform == "linux": + MAP_NORESERVE: Final = 16384