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

Christopher Ferris via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 9 13:16:50 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)
----------------
cferris1000 wrote:

You mean remove the configuration parameter completely and always use the real usable size when MTE is not on?

I'm not opposed to that but I do worry that it changes the behavior of existing configs.

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


More information about the llvm-commits mailing list