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

feat(RGData,StringStore): add counting allocator capabilities to those ctors used in BPP::execute()

This commit is contained in:
drrtuy
2024-11-30 18:51:29 +00:00
parent 51374aef4d
commit 5383e7c5a2
14 changed files with 305 additions and 132 deletions

View File

@ -52,13 +52,13 @@ void PoolAllocator::deallocateAll()
void PoolAllocator::newBlock()
{
std::shared_ptr<uint8_t[]> next;
std::shared_ptr<PoolAllocatorBufType[]> next;
capacityRemaining = allocSize;
if (!tmpSpace || mem.size() == 0)
{
next.reset(new uint8_t[allocSize]);
next.reset(new PoolAllocatorBufType[allocSize]);
mem.push_back(next);
nextAlloc = next.get();
}
@ -71,7 +71,7 @@ void* PoolAllocator::allocOOB(uint64_t size)
OOBMemInfo memInfo;
memUsage += size;
memInfo.mem.reset(new uint8_t[size]);
memInfo.mem.reset(new PoolAllocatorBufType[size]);
memInfo.size = size;
void* ret = (void*)memInfo.mem.get();
oob[ret] = memInfo;