[compiler-rt] [scudo] [MTE] resize stack depot for allocation ring buffer (PR #74515)

via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 2 11:43:27 PST 2024


================
@@ -1491,6 +1524,44 @@ class Allocator {
       return;
     u32 AllocationRingBufferSize =
         static_cast<u32>(getFlags()->allocation_ring_buffer_size);
+
+    // We store alloc and free stacks for each entry.
+    constexpr auto kStacksPerRingBufferEntry = 2;
+    constexpr auto kMaxU32Pow2 = ~(UINT32_MAX >> 1);
+    static_assert(isPowerOfTwo(kMaxU32Pow2));
+    constexpr auto kFramesPerStack = 8;
----------------
ChiaHungDuan wrote:

Please specify the type instead of `auto`. 

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


More information about the llvm-commits mailing list