mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-09 16:33:35 +00:00
Usually lsa allocation is performed with the construct() helper that allocates a sizeof(T) slot and constructs it in place. Some rare objects have dynamic size, so they are created by alloc()ating a slot of some specific size and (!) must provide the correct overload of size_for_allocation_strategy that reports back the relevant storage size. This "must provide" is not enforced, if missed a default sizer would be instantiated, but won't work properly. This patch makes all users of alloc() conform to DynamicObject concept which requires the presense of .storage_size() method to tell that size. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
7.4 KiB
7.4 KiB