A memory allocation.
More...
#include <allocator.hpp>
|
| Allocation (const Allocation &)=delete |
|
| Allocation (Allocation &&other) noexcept |
|
Allocation & | operator= (const Allocation &)=delete |
|
Allocation & | operator= (Allocation &&other) noexcept |
|
void | free () |
| Frees the allocation.
|
|
uint8_t * | data () const noexcept |
| Returns a pointer to the data of the allocation.
|
|
uintptr_t | address () const noexcept |
| Returns the address of the allocation.
|
|
size_t | size () const noexcept |
| Returns the size of the allocation.
|
|
| operator bool () const noexcept |
| Tests if the allocation is valid.
|
|
◆ address()
uintptr_t safetyhook::Allocation::address |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Returns the address of the allocation.
- Returns
- The address of the allocation.
◆ data()
uint8_t * safetyhook::Allocation::data |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Returns a pointer to the data of the allocation.
- Returns
- Pointer to the data of the allocation.
◆ free()
void safetyhook::Allocation::free |
( |
| ) |
|
Frees the allocation.
- Note
- This is called automatically when the Allocation object is destroyed.
◆ operator bool()
safetyhook::Allocation::operator bool |
( |
| ) |
const |
|
inlineexplicitnoexcept |
Tests if the allocation is valid.
- Returns
- True if the allocation is valid, false otherwise.
◆ size()
size_t safetyhook::Allocation::size |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Returns the size of the allocation.
- Returns
- The size of the allocation.
The documentation for this class was generated from the following file: