Represents a reservation for future memory allocation. More...
#include <resource.hpp>
Public Member Functions | |
| ~MemoryReservation () noexcept | |
| Destructor for the memory reservation. More... | |
| void | clear () noexcept |
| Clear the remaining size of the reservation. | |
| MemoryReservation (MemoryReservation &&o) | |
| Move constructor for MemoryReservation. More... | |
| MemoryReservation & | operator= (MemoryReservation &&o) noexcept |
| Move assignment operator for MemoryReservation. More... | |
| MemoryReservation (MemoryReservation const &)=delete | |
| A memory reservation is not copyable. | |
| MemoryReservation & | operator= (MemoryReservation const &)=delete |
| constexpr std::size_t | size () const noexcept |
| Get the remaining size of the reserved memory. More... | |
| constexpr MemoryType | mem_type () const noexcept |
| Get the type of memory associated with this reservation. More... | |
| constexpr BufferResource * | br () const noexcept |
| Get the buffer resource associated with this reservation. More... | |
Friends | |
| class | BufferResource |
Represents a reservation for future memory allocation.
A reservation is returned by BufferResource::reserve and must be used when allocating buffers through the BufferResource.
Definition at line 33 of file resource.hpp.
|
noexcept |
Destructor for the memory reservation.
Cleans up resources associated with the reservation.
|
inline |
Move constructor for MemoryReservation.
| o | The memory reservation to move from. |
Definition at line 54 of file resource.hpp.
|
inlineconstexprnoexcept |
Get the buffer resource associated with this reservation.
Definition at line 100 of file resource.hpp.
|
inlineconstexprnoexcept |
Get the type of memory associated with this reservation.
Definition at line 91 of file resource.hpp.
|
inlinenoexcept |
Move assignment operator for MemoryReservation.
| o | The memory reservation to move from. |
Definition at line 65 of file resource.hpp.
|
inlineconstexprnoexcept |
Get the remaining size of the reserved memory.
Definition at line 82 of file resource.hpp.