|
| | ResourceAllocator (Allocator *baseAllocator) |
| |
| void * | allocate (size_t size, size_t alignment, MemBlockType type=MemBlockType::Block) override |
| | Allocate raw memory.
|
| |
| void | deallocate (void *ptr, size_t size, MemBlockType type=MemBlockType::Block) override |
| | Deallocate the memory block at the given pointer, with the given size.
|
| |
| 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 50 of file GraphicsDeviceD3D11.cpp.
◆ ResourceAllocator()
| Cogs::ResourceAllocator::ResourceAllocator |
( |
Allocator * |
baseAllocator | ) |
|
|
inline |
◆ ~ResourceAllocator()
| Cogs::ResourceAllocator::~ResourceAllocator |
( |
| ) |
|
|
inline |
◆ allocate()
| void * Cogs::ResourceAllocator::allocate |
( |
size_t |
size, |
|
|
size_t |
alignment, |
|
|
MemBlockType |
type = MemBlockType::Block |
|
) |
| |
|
inlineoverridevirtual |
◆ deallocate()
| void Cogs::ResourceAllocator::deallocate |
( |
void * |
ptr, |
|
|
size_t |
size, |
|
|
MemBlockType |
type = MemBlockType::Block |
|
) |
| |
|
inlineoverridevirtual |
Deallocate the memory block at the given pointer, with the given size.
The size parameter may be given to enable extra checking when releasing memory.
- Parameters
-
| ptr | Pointer to previously allocated memory. |
| size | Size in bytes of the given allocation. |
Reimplemented from Cogs::Memory::Allocator.
Definition at line 64 of file GraphicsDeviceD3D11.cpp.
◆ baseAllocator
◆ memorySize
| std::atomic<size_t> Cogs::ResourceAllocator::memorySize = 0 |
The documentation for this struct was generated from the following file: