[compiler-rt] b30d667 - [scudo] Change CompactPtrT and CompactPtrScale to optional (#90797)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 14:11:13 PDT 2024


Author: ChiaHungDuan
Date: 2024-07-08T14:11:10-07:00
New Revision: b30d6671814cb5ac0b7f36b8b77345176e5132ba

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

LOG: [scudo] Change CompactPtrT and CompactPtrScale to optional (#90797)

Added: 
    

Modified: 
    compiler-rt/lib/scudo/standalone/allocator_config.def

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/scudo/standalone/allocator_config.def b/compiler-rt/lib/scudo/standalone/allocator_config.def
index dcd130ac449a0..ce37b1cfaedcc 100644
--- a/compiler-rt/lib/scudo/standalone/allocator_config.def
+++ b/compiler-rt/lib/scudo/standalone/allocator_config.def
@@ -56,16 +56,8 @@ BASE_OPTIONAL(const bool, MaySupportMemoryTagging, false)
 // SizeClassMap to use with the Primary.
 PRIMARY_REQUIRED_TYPE(SizeClassMap)
 
-// Defines the type and scale of a compact pointer. A compact pointer can
-// be understood as the offset of a pointer within the region it belongs
-// to, in increments of a power-of-2 scale. See `CompactPtrScale` also.
-PRIMARY_REQUIRED_TYPE(CompactPtrT)
-
 // PRIMARY_REQUIRED(TYPE, NAME)
 //
-// The scale of a compact pointer. E.g., Ptr = Base + (CompactPtr << Scale).
-PRIMARY_REQUIRED(const uptr, CompactPtrScale)
-
 // Log2 of the size of a size class region, as used by the Primary.
 PRIMARY_REQUIRED(const uptr, RegionSizeLog)
 
@@ -86,6 +78,9 @@ PRIMARY_REQUIRED(const s32, MaxReleaseToOsIntervalMs)
 
 // PRIMARY_OPTIONAL(TYPE, NAME, DEFAULT)
 //
+// The scale of a compact pointer. E.g., Ptr = Base + (CompactPtr << Scale).
+PRIMARY_OPTIONAL(const uptr, CompactPtrScale, SCUDO_MIN_ALIGNMENT_LOG)
+
 // Indicates support for offsetting the start of a region by a random number of
 // pages. This is only used if `EnableContiguousRegions` is enabled.
 PRIMARY_OPTIONAL(const bool, EnableRandomOffset, false)
@@ -104,6 +99,11 @@ PRIMARY_OPTIONAL(const bool, EnableContiguousRegions, true)
 // guarantee a performance benefit.
 PRIMARY_OPTIONAL_TYPE(ConditionVariableT, ConditionVariableDummy)
 
+// Defines the type and scale of a compact pointer. A compact pointer can
+// be understood as the offset of a pointer within the region it belongs
+// to, in increments of a power-of-2 scale. See `CompactPtrScale` also.
+PRIMARY_OPTIONAL_TYPE(CompactPtrT, uptr)
+
 // SECONDARY_REQUIRED_TEMPLATE_TYPE(NAME)
 //
 // Defines the type of Secondary Cache to use.


        


More information about the llvm-commits mailing list