[compiler-rt] [scudo] Add config option to modify get usable size behavior (PR #158710)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 23 00:20:54 PDT 2025


================
@@ -57,6 +57,10 @@ BASE_OPTIONAL(const bool, MaySupportMemoryTagging, false)
 // Disable the quarantine code.
 BASE_OPTIONAL(const bool, QuarantineDisabled, false)
 
+// If set to true, malloc_usable_size returns the exact size of the allocation.
+// If set to false, return the total available size in the allocation.
+BASE_OPTIONAL(const bool, ExactUsableSize, true)
----------------
ChiaHungDuan wrote:

I'm thinking if we want to make this enabled when it's MTE, disabled otherwise. And make this configurable when we get more evidence that this is useful. what do you think?

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


More information about the llvm-commits mailing list