[compiler-rt] [scudo] Add static vector functionality. (PR #98986)

Joshua Baehring via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 16 19:21:17 PDT 2024


================
@@ -116,18 +118,19 @@ template <typename T> class VectorNoCtor {
   uptr CapacityBytes = 0;
   uptr Size = 0;
 
-  T LocalData[256 / sizeof(T)] = {};
+  T LocalData[StaticCapacity] = {};
   MemMapT ExternalBuffer;
 };
 
-template <typename T> class Vector : public VectorNoCtor<T> {
+template <typename T, size_t StaticCapacity = 8>
----------------
JoshuaMBa wrote:

Resolved by allowing user to configure vector size with bytes rather than the number of entries that can fit in local data.

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


More information about the llvm-commits mailing list