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

feat(): propagate long strings SP type change

This commit is contained in:
drrtuy
2024-12-04 23:45:05 +00:00
parent 4e86123a5a
commit 71ed9cabe0
7 changed files with 71 additions and 30 deletions

View File

@ -19,6 +19,7 @@
#include <atomic>
#include <cstddef>
#include "countingallocator.h"
#include "rowgroup.h"
using namespace allocators;
@ -108,6 +109,13 @@ TEST_F(CountingAllocatorTest, AllocateSharedUsesAllocator)
ptr.reset();
EXPECT_EQ(allocatedMemory.load(), MemoryAllowance);
size_t allocSize = 16ULL * rowgroup::rgCommonSize;
auto buf = boost::allocate_shared<rowgroup::RGDataBufType>(allocator, allocSize);
EXPECT_LE(allocatedMemory.load(), MemoryAllowance - allocSize);
buf.reset();
EXPECT_EQ(allocatedMemory.load(), MemoryAllowance);
}
// Test 5: Thread Safety - Concurrent Allocations and Deallocations