MAP_ANON
MAP_ANONYMOUS
MAP_POPULATE
+ MAP_STACK
These are the various flags that can be passed to :meth:`mmap.mmap`. Note that some options might not be present on some systems.
.. versionchanged:: 3.10
Added MAP_POPULATE constant.
+
+ .. versionadded:: 3.11
+ Added MAP_STACK constant.
#endif
#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;