#include <Allocator.h>
Collaboration diagram for nvutil::Allocator:
Public Methods | |
Allocator () | |
Default constructor. More... | |
~Allocator () | |
Destructor. More... | |
void * | alloc (size_t size) |
Allocate continuous memory of size size. More... | |
void | dealloc (void *p, size_t size) |
Deallocate previously allocated memory. More... |
This class is used as a Singleton
by IAllocator
, which is the base of all RCObject
classes. It manages the efficient allocation of small objects by using an array of FixedAllocator
objects, one for each small size up to maxBlockSize
. Allocations larger than that size are redirected to the standard allocation ::new
.
|
Default constructor.
Initializes the array of |
|
Destructor. In debug mode warnings on not deleted objects are emitted. |
|
Allocate continuous memory of size size.
Forwards either to the
|
|
Deallocate previously allocated memory.
Forwards either to the
|