diff options
author | David CARLIER <devnexen@gmail.com> | 2021-12-29 13:52:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-29 13:52:29 (GMT) |
commit | 66c47b63a0df3143fe48d6efc1183eecda2a363d (patch) | |
tree | e2afecfc8dd8583c2bbb45e9462d82d6f735d3ca /Modules | |
parent | 77195cd44b2506cda88a3cfc98918526068b1d46 (diff) | |
download | cpython-66c47b63a0df3143fe48d6efc1183eecda2a363d.zip cpython-66c47b63a0df3143fe48d6efc1183eecda2a363d.tar.gz cpython-66c47b63a0df3143fe48d6efc1183eecda2a363d.tar.bz2 |
bpo-46176: mmap module adding MAP_STACK constant. (GH-30252)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/mmapmodule.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index 399cb0a..742bcb3 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -1638,6 +1638,11 @@ mmap_exec(PyObject *module) #ifdef MAP_POPULATE ADD_INT_MACRO(module, MAP_POPULATE); #endif +#ifdef MAP_STACK + // Mostly a no-op on Linux and NetBSD, but useful on OpenBSD + // for stack usage (even on x86 arch) + ADD_INT_MACRO(module, MAP_STACK); +#endif if (PyModule_AddIntConstant(module, "PAGESIZE", (long)my_getpagesize()) < 0 ) { return -1; } |