|
vsg 1.1.3
VulkanSceneGraph library
|
#include <MemorySlots.h>
Public Types | |
| using | OptionalOffset = std::pair<bool, size_t> |
Public Member Functions | |
| MemorySlots (size_t availableMemorySize, int in_memoryTracking=MEMORY_TRACKING_DEFAULT) | |
| OptionalOffset | reserve (size_t size, size_t alignment) |
| bool | release (size_t offset, size_t size) |
| bool | full () const |
| bool | empty () const |
| size_t | maximumAvailableSpace () const |
| size_t | totalAvailableSize () const |
| size_t | totalReservedSize () const |
| size_t | totalMemorySize () const |
| void | report (std::ostream &out) const |
| bool | check () const |
Public Attributes | |
| int | memoryTracking = MEMORY_TRACKING_DEFAULT |
Protected Member Functions | |
| void | insertAvailableSlot (size_t offset, size_t size) |
| void | removeAvailableSlot (size_t offset, size_t size) |
Protected Attributes | |
| std::multimap< size_t, size_t > | _availableMemory |
| std::map< size_t, size_t > | _offsetSizes |
| std::map< size_t, size_t > | _reservedMemory |
| size_t | _totalMemorySize |
class used internally by vsg::Allocator, vsg::DeviceMemory and vsg::Buffer to manage suballocation within a block of CPU or GPU memory.