8#ifndef HPP_ALIB_MONOMEM_LOCALALLOCATOR
9#define HPP_ALIB_MONOMEM_LOCALALLOCATOR 1
16#include "alib/monomem/monoallocator.hpp"
17namespace alib {
namespace monomem {
43template<
size_t TCapacityInKB,
typename TAllocator= lang::HeapAllocator>
61 new (
localMemory) detail::Buffer( TCapacityInKB*1024),
63 pBufferGrowthInPercent ) {}
74 new (
localMemory) detail::Buffer( TCapacityInKB*1024),
76 pBufferGrowthInPercent) {}
96template<
size_t TCapacityInKB>
~TLocalAllocator()
Destructor. Calls MonoAllocator::destructWithExternalBuffer.
TLocalAllocator(TAllocator &pAllocator, unsigned int pBufferGrowthInPercent=200)
MonoAllocator & AsMonoAllocator()
TLocalAllocator(unsigned int pBufferGrowthInPercent=200)
void * localMemory[TCapacityInKB *1024/sizeof(void *)]
Internal memory passed as a first buffer to base class MonoAllocator.
ALIB_API void destructWithExternalBuffer()
#define ALIB_ASSERT_MODULE(modulename)