[llvm] [Support] Recycler: Enforce minimum allocation size (PR #121425)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 2 06:38:41 PST 2025


================
@@ -85,6 +85,8 @@ class Recycler {
                   "Recycler allocation alignment is less than object align!");
     static_assert(sizeof(SubClass) <= Size,
                   "Recycler allocation size is less than object size!");
+    static_assert(Size >= sizeof(FreeNode) &&
+                  "Recycler size must be atleast 8");
----------------
arsenm wrote:

```suggestion
                  "Recycler size must be at least 8");
```

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


More information about the llvm-commits mailing list