[PATCH] D96626: Support: mapped_file_region: Pass MAP_NORESERVE to mmap

Joseph Tremoulet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 8 06:07:54 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb785e03612d7: Support: mapped_file_region:  Pass MAP_NORESERVE to mmap (authored by JosephTremoulet).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96626/new/

https://reviews.llvm.org/D96626

Files:
  llvm/lib/Support/Unix/Path.inc


Index: llvm/lib/Support/Unix/Path.inc
===================================================================
--- llvm/lib/Support/Unix/Path.inc
+++ llvm/lib/Support/Unix/Path.inc
@@ -815,6 +815,9 @@
 
   int flags = (Mode == readwrite) ? MAP_SHARED : MAP_PRIVATE;
   int prot = (Mode == readonly) ? PROT_READ : (PROT_READ | PROT_WRITE);
+#if defined(MAP_NORESERVE)
+  flags |= MAP_NORESERVE;
+#endif
 #if defined(__APPLE__)
   //----------------------------------------------------------------------
   // Newer versions of MacOSX have a flag that will allow us to read from


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96626.336076.patch
Type: text/x-patch
Size: 572 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210408/695308d6/attachment.bin>


More information about the llvm-commits mailing list