This request the page to be never written out to swap, it will be zeroed
under memory pressure (so kernel can just drop the page), it is inherited
by fork, it is not counted against @code{mlock} budget, and if there is
no enough memory to service a page faults there is no fatal error (so not
signal is sent).
Tested with build-many-glibcs.py.
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
most other flags, this one will fail unless @code{MAP_SHARED_VALIDATE}
is also given.
+@item MAP_DROPPABLE
+Request the page to be never written out to swap, it will be zeroed
+under memory pressure (so kernel can just drop the page), it is inherited
+by fork, it is not counted against @code{mlock} budget, and if there is
+not enough memory to service a page fault there is no fatal error (so no
+signal is sent).
+
+The @code{MAP_DROPPABLE} flag is specific to Linux.
+
@end vtable
@code{mmap} returns the address of the new mapping, or
#define MAP_PRIVATE 0x02 /* Changes are private. */
#define MAP_SHARED_VALIDATE 0x03 /* Share changes and validate
extension flags. */
+#define MAP_DROPPABLE 0x08 /* Zero memory under memory pressure. */
#define MAP_TYPE 0x0f /* Mask for type of mapping. */
/* Other flags. */
help='C compiler (including options) to use')
args = parser.parse_args()
linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc)
- linux_version_glibc = (6, 10)
+ linux_version_glibc = (6, 11)
sys.exit(glibcextract.compare_macro_consts(
'#define _GNU_SOURCE 1\n'
'#include <sys/mman.h>\n',