#include <GpuBufferLinearAllocator.hpp>
◆ GpuBufferLinearAllocator()
C3D_API castor3d::GpuBufferLinearAllocator::GpuBufferLinearAllocator |
( |
size_t | count, |
|
|
uint32_t | alignment ) |
Constructor.
- Parameters
-
[in] | count | The allocator elements count. |
[in] | alignment | The alignment for one element. |
◆ allocate()
C3D_API VkDeviceSize castor3d::GpuBufferLinearAllocator::allocate |
( |
size_t | size | ) |
|
Allocates memory.
- Parameters
-
[in] | size | The requested memory size. |
- Returns
- The memory chunk.
◆ deallocate()
C3D_API void castor3d::GpuBufferLinearAllocator::deallocate |
( |
VkDeviceSize | pointer | ) |
|
|
noexcept |
Deallocates memory.
- Parameters
-
[in] | pointer | The memory chunk. |
◆ getAlignSize()
size_t castor3d::GpuBufferLinearAllocator::getAlignSize |
( |
| ) |
const |
|
inline |
- Returns
- The element aligned size.
◆ getTotalSize()
size_t castor3d::GpuBufferLinearAllocator::getTotalSize |
( |
| ) |
const |
|
inline |
- Returns
- The allocator size.
◆ hasAvailable()
bool castor3d::GpuBufferLinearAllocator::hasAvailable |
( |
size_t | | ) |
const |
|
inline |
- Returns
true
if there is enough remaining memory for given size.
The documentation for this struct was generated from the following file: