[compiler-rt] [scudo] Support no-preserve-all-regions mode (PR #85149)

via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 28 15:11:22 PDT 2024


================
@@ -87,9 +87,15 @@ PRIMARY_REQUIRED(const s32, MaxReleaseToOsIntervalMs)
 // PRIMARY_OPTIONAL(TYPE, NAME, DEFAULT)
 //
 // Indicates support for offsetting the start of a region by a random number of
-// pages. Only used with primary64.
+// pages. This is only used if `PreserveAllRegions` is enabled.
 PRIMARY_OPTIONAL(const bool, EnableRandomOffset, false)
 
+// When `PreserveAllRegions` is true, the virtual address for all regions will
+// be preserved within a big chunk of memory. This will reduce the fragmentation
+// caused by region allocations but may require a huge amount of contiguous
+// pages at initialization.
+PRIMARY_OPTIONAL(const bool, PreserveAllRegions, true)
----------------
ChiaHungDuan wrote:

Add one more thing, per discussion, the name will be changed to `ContiguousRegions` to emphasize the layout of regions and not focusing on when the regions are allocated.

https://github.com/llvm/llvm-project/pull/85149


More information about the llvm-commits mailing list