From: Joseph Myers Date: Thu, 22 Dec 2022 15:12:52 +0000 (+0000) Subject: Define MADV_COLLAPSE from Linux 6.1 X-Git-Tag: glibc-2.37~63 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=81a94a2ae34bac9c3d907bbe0468ba56914accb0;p=thirdparty%2Fglibc.git Define MADV_COLLAPSE from Linux 6.1 Add the MADV_COLLAPSE constant from Linux 6.1 to bits/mman-linux.h and the hppa bits/mman.h. Tested for x86_64. --- diff --git a/sysdeps/unix/sysv/linux/bits/mman-linux.h b/sysdeps/unix/sysv/linux/bits/mman-linux.h index 1fb7f888aa5..c3818ce356f 100644 --- a/sysdeps/unix/sysv/linux/bits/mman-linux.h +++ b/sysdeps/unix/sysv/linux/bits/mman-linux.h @@ -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 diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h index acaa1cc3e79..1d895a52344 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/mman.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/mman.h @@ -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