From 789ff6a9f8ec91729cde7fdcb0568d5d928eeba5 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sun, 24 Jan 2016 01:19:38 +0000 Subject: add MCL_ONFAULT and MLOCK_ONFAULT mlockall and mlock2 flags they lock faulted pages into memory (useful when a small part of a large mapped file needs efficient access), new in linux v4.4, commit b0f205c2a3082dd9081f9a94e50658c5fa906ff1 MLOCK_* is not in the POSIX reserved namespace for sys/mman.h --- include/sys/mman.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sys/mman.h') diff --git a/include/sys/mman.h b/include/sys/mman.h index 9fc2db51..a1864ec8 100644 --- a/include/sys/mman.h +++ b/include/sys/mman.h @@ -39,6 +39,7 @@ int remap_file_pages (void *, size_t, int, size_t, int); #endif #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define MLOCK_ONFAULT 0x01 int madvise (void *, size_t, int); int mincore (void *, size_t, unsigned char *); #endif -- cgit v1.2.1