[llvm] ed6daa2 - [Support][NFC] Add a comment about the semantics of MF_HUGE_HINT flag

Bruno Ricci via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 9 09:35:19 PST 2020


Author: Bruno Ricci
Date: 2020-01-09T17:34:18Z
New Revision: ed6daa2e1d32e940ac4bd8c31ae05154c5ed9bd3

URL: https://github.com/llvm/llvm-project/commit/ed6daa2e1d32e940ac4bd8c31ae05154c5ed9bd3
DIFF: https://github.com/llvm/llvm-project/commit/ed6daa2e1d32e940ac4bd8c31ae05154c5ed9bd3.diff

LOG: [Support][NFC] Add a comment about the semantics of MF_HUGE_HINT flag

Added: 
    

Modified: 
    llvm/include/llvm/Support/Memory.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Support/Memory.h b/llvm/include/llvm/Support/Memory.h
index 6f22dd7080cd..c0454223b2fd 100644
--- a/llvm/include/llvm/Support/Memory.h
+++ b/llvm/include/llvm/Support/Memory.h
@@ -57,6 +57,17 @@ namespace sys {
       MF_WRITE = 0x2000000,
       MF_EXEC = 0x4000000,
       MF_RWE_MASK = 0x7000000,
+
+      /// The \p MF_HUGE_HINT flag is used to indicate that the request for
+      /// a memory block should be satisfied with large pages if possible.
+      /// This is only a hint and small pages will be used as fallback.
+      ///
+      /// The presence or absence of this flag in the returned memory block
+      /// is (at least currently) *not* a reliable indicator that the memory
+      /// block will use or will not use large pages. On some systems a request
+      /// without this flag can be backed by large pages without this flag being
+      /// set, and on some other systems a request with this flag can fallback
+      /// to small pages without this flag being cleared.
       MF_HUGE_HINT = 0x0000001
     };
 


        


More information about the llvm-commits mailing list