|
| | CoreAllocator (Memory::Allocator *baseAllocator, StringView tag, bool base=false) |
| |
| size_t | size () const |
| |
| size_t | count () const |
| |
| size_t | peakSize () const |
| |
| size_t | peakCount () const |
| |
| void * | allocate (size_t size, size_t alignment, MemBlockType type=MemBlockType::CoreAllocator) override |
| | Allocate raw memory.
|
| |
| void | deallocate (void *ptr, size_t size, MemBlockType type=MemBlockType::CoreAllocator) override |
| | Deallocate the memory block at the given pointer, with the given size.
|
| |
| size_t | getAllocatedBytes () const override |
| | Return the number of bytes currently allocated by this allocator.
|
| |
| size_t | getAllocationCount () const override |
| | Return the number of allocations currently allocated by this allocator.
|
| |
| virtual void * | allocate (size_t size, size_t alignment=0, MemBlockType type=MemBlockType::Block) |
| | Allocate raw memory.
|
| |
| virtual void | deallocate (void *ptr, size_t size, MemBlockType type=MemBlockType::Block) |
| | Deallocate the memory block at the given pointer, with the given size.
|
| |
| virtual void | changeType (void *ptr, size_t size, MemBlockType oldType, MemBlockType newType) |
| |
| virtual size_t | getAllocatedBytes () const |
| | Return the number of bytes currently allocated by this allocator.
|
| |
| virtual size_t | getAllocationCount () const |
| | Return the number of allocations currently allocated by this allocator.
|
| |
Definition at line 17 of file MemoryContext.cpp.
◆ CoreAllocator()
◆ ~CoreAllocator()
| Cogs::Core::CoreAllocator::~CoreAllocator |
( |
| ) |
|
|
inline |
◆ allocate()
| void * Cogs::Core::CoreAllocator::allocate |
( |
size_t |
size, |
|
|
size_t |
alignment, |
|
|
MemBlockType |
type = MemBlockType::CoreAllocator |
|
) |
| |
|
inlineoverridevirtual |
◆ count()
| size_t Cogs::Core::CoreAllocator::count |
( |
| ) |
const |
|
inline |
◆ deallocate()
| void Cogs::Core::CoreAllocator::deallocate |
( |
void * |
ptr, |
|
|
size_t |
size, |
|
|
MemBlockType |
type = MemBlockType::CoreAllocator |
|
) |
| |
|
inlineoverridevirtual |
◆ getAllocatedBytes()
| size_t Cogs::Core::CoreAllocator::getAllocatedBytes |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ getAllocationCount()
| size_t Cogs::Core::CoreAllocator::getAllocationCount |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ peakCount()
| size_t Cogs::Core::CoreAllocator::peakCount |
( |
| ) |
const |
|
inline |
◆ peakSize()
| size_t Cogs::Core::CoreAllocator::peakSize |
( |
| ) |
const |
|
inline |
◆ size()
| size_t Cogs::Core::CoreAllocator::size |
( |
| ) |
const |
|
inline |
◆ allocationCount
| Atomic<size_t> Cogs::Core::CoreAllocator::allocationCount { 0 } |
|
private |
◆ allocationSize
| Atomic<size_t> Cogs::Core::CoreAllocator::allocationSize { 0 } |
|
private |
◆ base
| bool Cogs::Core::CoreAllocator::base = false |
|
private |
◆ baseAllocator
◆ peakAllocationCount
| Atomic<size_t> Cogs::Core::CoreAllocator::peakAllocationCount { 0 } |
|
private |
◆ peakAllocationSize
| Atomic<size_t> Cogs::Core::CoreAllocator::peakAllocationSize { 0 } |
|
private |
◆ tag
The documentation for this class was generated from the following file: