LiteFX::Rendering::VirtualAllocator::allocate¶
Allocates a piece of memory of size bytes, aligned to alignment.
Synopsis¶
Declared in <litefx/rendering_api.hpp>
[[dllimport, nodiscard, dllexport]] Allocation allocate(
UInt64 size,
UInt32 alignment = 1u,
AllocationStrategy strategy = AllocationStrategy::OptimizePacking,
void* privateData = nullptr) const;
Return Value¶
An object that contains details about the allocation.
Note
The return value should not be discarded.
Parameters¶
| Name | Description |
|---|---|
| size | The size (in bytes) of the resource to place in the allocation. |
| alignment | The alignment requirements of the resource. |
| strategy | The strategy to look for a place to put the allocation in. |
| privateData | A pointer to an object that should be internally associated with the allocation. |