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
feat(): propagated changes into SLTPoolAllocator and friends
This commit is contained in:
@ -25,6 +25,7 @@
|
||||
#include <memory>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include "poolallocator.h"
|
||||
#include "resourcemanager.h"
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
@ -61,6 +62,7 @@ class STLPoolAllocator
|
||||
};
|
||||
|
||||
STLPoolAllocator() throw();
|
||||
STLPoolAllocator(joblist::ResourceManager* rm);
|
||||
STLPoolAllocator(const STLPoolAllocator&) throw();
|
||||
STLPoolAllocator(uint32_t capacity) throw();
|
||||
template <class U>
|
||||
@ -94,6 +96,20 @@ STLPoolAllocator<T>::STLPoolAllocator() throw()
|
||||
pa.reset(new PoolAllocator(DEFAULT_SIZE));
|
||||
}
|
||||
|
||||
template <class T>
|
||||
STLPoolAllocator<T>::STLPoolAllocator(joblist::ResourceManager* rm)
|
||||
{
|
||||
if (rm)
|
||||
{
|
||||
auto alloc = rm->getAllocator<PoolAllocatorBufType>();
|
||||
pa.reset(new PoolAllocator(alloc));
|
||||
}
|
||||
else
|
||||
{
|
||||
pa.reset(new PoolAllocator(DEFAULT_SIZE));
|
||||
}
|
||||
}
|
||||
|
||||
template <class T>
|
||||
STLPoolAllocator<T>::STLPoolAllocator(const STLPoolAllocator<T>& s) throw()
|
||||
{
|
||||
|
Reference in New Issue
Block a user