]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Define MADV_COLLAPSE from Linux 6.1
authorJoseph Myers <joseph@codesourcery.com>
Thu, 22 Dec 2022 15:12:52 +0000 (15:12 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Thu, 22 Dec 2022 15:12:52 +0000 (15:12 +0000)
Add the MADV_COLLAPSE constant from Linux 6.1 to bits/mman-linux.h and
the hppa bits/mman.h.

Tested for x86_64.

sysdeps/unix/sysv/linux/bits/mman-linux.h
sysdeps/unix/sysv/linux/hppa/bits/mman.h

index 1fb7f888aa591b5232e333bf783f38b674c35b1d..c3818ce356fccba1a4f3762b3168b700a41ca78e 100644 (file)
@@ -91,6 +91,7 @@
                                   writable.  */
 # define MADV_DONTNEED_LOCKED 24 /* Like MADV_DONTNEED, but drop
                                    locked pages too.  */
+# define MADV_COLLAPSE    25   /* Synchronous hugepage collapse.  */
 # define MADV_HWPOISON   100   /* Poison a page for testing.  */
 #endif
 
index acaa1cc3e79a5ff17bbe9682e2b9654842570046..1d895a523448a7b448c1da94b42e5d02b3a62300 100644 (file)
@@ -79,4 +79,6 @@
 # define MADV_WIPEONFORK 71    /* Zero memory on fork, child only.  */
 # undef MADV_KEEPONFORK
 # define MADV_KEEPONFORK 72    /* Undo MADV_WIPEONFORK.  */
+# undef MADV_COLLAPSE
+# define MADV_COLLAPSE   73    /* Synchronous hugepage collapse.  */
 #endif