27 #ifndef INCLUDED_ALLOCATORS_ARENA
28 #define INCLUDED_ALLOCATORS_ARENA
32 namespace Allocators {
42 template<
class Storage = Storage_Fixed<> >
126 while (chunk != NULL)
150 debug_warn(L
"DynamicArena cannot allocate more than chunk size");
151 throw std::bad_alloc();
173 #endif // #ifndef INCLUDED_ALLOCATORS_ARENA
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
allocator design parameters:
size_t MaxCapacity() const
bool Contains(uintptr_t address) const
static uintptr_t StorageAppend(Storage &storage, size_t &end, size_t size)
#define ENSURE(expr)
ensure the expression <expr> evaluates to non-zero.
DynamicArena(size_t chunkSize)
size_t RemainingBytes() const
void deallocate(void *p, size_t size)
NONCOPYABLE(DynamicArena)
uintptr_t Allocate(size_t size)
bool Available(size_t size) const
void deallocate(void *p, size_t size)
allocator design parameters:
#define debug_warn(expr)
display the error dialog with the given text.
void * allocate(size_t size)
uintptr_t Address() const
void * allocate(size_t size)