You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
fix(perf,allocator): adding unit test to check CountingAllocator behavior when it is wrapped in STLPoolAllocator
This commit is contained in:
@ -25,6 +25,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <optional>
|
||||
@ -32,9 +33,10 @@
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <boost/smart_ptr/allocate_shared_array.hpp>
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#include "countingallocator.h"
|
||||
|
||||
@ -57,6 +59,7 @@ class PoolAllocator
|
||||
, useLock(_useLock)
|
||||
, lock(false)
|
||||
{
|
||||
std::cout << "PoolAllocator w/o counting allocator created" << std::endl;
|
||||
}
|
||||
PoolAllocator(allocators::CountingAllocator<PoolAllocatorBufType> alloc, unsigned windowSize = DEFAULT_WINDOW_SIZE,
|
||||
bool isTmpSpace = false, bool _useLock = false)
|
||||
@ -69,6 +72,7 @@ class PoolAllocator
|
||||
, lock(false)
|
||||
, alloc(alloc)
|
||||
{
|
||||
std::cout << "PoolAllocator with counting allocator created" << std::endl;
|
||||
}
|
||||
PoolAllocator(const PoolAllocator& p)
|
||||
: allocSize(p.allocSize)
|
||||
|
Reference in New Issue
Block a user