template class Core::PoolAllocatorExtern
Overview
Pool-based allocator base class. More…
#include <corepoolallocator.h> template <typename T, uint32 numBlocks, uint32 blockSize = 1> class PoolAllocatorExtern: public Core::Allocator { public: // construction PoolAllocatorExtern(T* pool); // methods bool isValidAddress(const T* address) const; virtual void* allocate(uint32 size); virtual void* reallocate(void* address, uint32 size); virtual void deallocate(void* address); }; // direct descendants template < typename T, uint32 numBlocks, uint32 blockSize = 1, uint32 alignment = 1 > class PoolAllocator;
Inherited Members
public: // methods static Allocator& getDefault(); virtual void* allocate(uint32 size) = 0; virtual void* reallocate(void* address, uint32 size) = 0; virtual void deallocate(void* address) = 0;
Detailed Documentation
Pool-based allocator base class.
Not thread safe!
Methods
virtual void* allocate(uint32 size)
Allocate a contiguous memory block of a given size.
virtual void* reallocate(void* address, uint32 size)
Resize a memory block that was previously allocated with allocate or allocate a new block.
Might move existing data to a new location.
virtual void deallocate(void* address)
Free previously allocated data.