diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-10-08 15:45:26 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-10-10 10:27:53 -0300 |
commit | f6e849fd7ce2a8954022bd23b94703975b3db0d1 (patch) | |
tree | e1661f1fbbe81a2e00a6073c3c011bb21a6e9985 /sysdeps/unix/sysv/linux/bits | |
parent | 86f06282ccb1b11de7a07fc10f7b77991b7d121a (diff) | |
download | glibc-f6e849fd7ce2a8954022bd23b94703975b3db0d1.zip glibc-f6e849fd7ce2a8954022bd23b94703975b3db0d1.tar.gz glibc-f6e849fd7ce2a8954022bd23b94703975b3db0d1.tar.bz2 |
linux: Add MAP_DROPPABLE from Linux 6.11
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>
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits')
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/mman-linux.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/mman-linux.h b/sysdeps/unix/sysv/linux/bits/mman-linux.h index 522333c..161a885 100644 --- a/sysdeps/unix/sysv/linux/bits/mman-linux.h +++ b/sysdeps/unix/sysv/linux/bits/mman-linux.h @@ -43,6 +43,7 @@ #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. */ |