1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

feat(): zerocopy TNS case and JOIN results RGData with CountingAllocator

This commit is contained in:
drrtuy
2025-02-17 21:38:10 +00:00
parent 3dfc8cd454
commit a4c4d33ee7
9 changed files with 96 additions and 62 deletions

View File

@ -113,8 +113,8 @@ TEST_F(CountingAllocatorTest, AllocatorEquality)
TEST_F(CountingAllocatorTest, AllocateSharedUsesAllocator)
{
// Create a shared_ptr using allocate_shared with the custom allocator
CountingAllocator<TestClass> allocatorSmallerStep(&allocatedMemory, MemoryAllowance / 100,
MemoryAllowance / 1000);
CountingAllocator<TestClass> allocatorSmallerStep(&allocatedMemory,
MemoryAllowance / 1000, MemoryAllowance / 100);
std::shared_ptr<TestClass> ptr1 = std::allocate_shared<TestClass>(allocatorSmallerStep, 100);
std::shared_ptr<TestClass> ptr2 = std::allocate_shared<TestClass>(allocatorSmallerStep, 100);
std::shared_ptr<TestClass> ptr3 = std::allocate_shared<TestClass>(allocatorSmallerStep, 100);
@ -164,8 +164,8 @@ TEST_F(CountingAllocatorTest, ThreadSafety)
auto worker = [this]()
{
std::vector<TestClass*> ptrs;
CountingAllocator<TestClass> allocatorLocal(&allocatedMemory, MemoryAllowance / 100,
MemoryAllowance / 1000);
CountingAllocator<TestClass> allocatorLocal(&allocatedMemory, MemoryAllowance / 1000,
MemoryAllowance / 100);
for (std::size_t i = 0; i < allocationsPerThread; ++i)
{
ptrs.push_back(allocatorLocal.allocate(1));