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

Joshua Baehring via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 17 11:49:11 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:

I've now committed the changes. For the entry numbers for the vector instances currently in use, I simply set them to what they would have been under the previous initial capacity (i.e. 256 / sizeof(T) entries).

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


More information about the llvm-commits mailing list