#include <BuddyAllocator.h>
|
| static constexpr bool | isLIFO () |
| | Check if the allocator is Last-In-First-Out (LIFO)
|
| |
This class provides basic routines to allocate/deallocate memory
Definition at line 14 of file BuddyAllocator.h.
◆ BuddyAllocator() [1/4]
| BuddyAllocator::BuddyAllocator |
( |
size_t |
bytes, |
|
|
size_t |
blockSize = 1024, |
|
|
std::function< void *(size_t)> |
allocator = ::malloc, |
|
|
std::function< void(void *)> |
deallocator = ::free, |
|
|
std::function< void(void *, size_t)> |
zero = [](void *, size_t) {} |
|
) |
| |
|
explicit |
◆ BuddyAllocator() [2/4]
| BuddyAllocator::BuddyAllocator |
( |
| ) |
|
◆ ~BuddyAllocator()
| BuddyAllocator::~BuddyAllocator |
( |
| ) |
|
◆ BuddyAllocator() [3/4]
◆ BuddyAllocator() [4/4]
◆ allocate()
| void * BuddyAllocator::allocate |
( |
size_t |
bytes | ) |
|
◆ allocateSize()
| void BuddyAllocator::allocateSize |
( |
| ) |
|
|
inlineprivate |
◆ blockAlloc()
| int BuddyAllocator::blockAlloc |
( |
int |
level | ) |
|
|
private |
◆ blockFree()
| void BuddyAllocator::blockFree |
( |
int |
level, |
|
|
int |
block |
|
) |
| |
|
private |
◆ deallocate()
| void BuddyAllocator::deallocate |
( |
void * |
p, |
|
|
size_t |
bytes |
|
) |
| |
◆ getLevel()
| int BuddyAllocator::getLevel |
( |
int |
block | ) |
|
|
inlineprivate |
◆ isLIFO()
| static constexpr bool BuddyAllocator::isLIFO |
( |
| ) |
|
|
inlinestaticconstexpr |
Check if the allocator is Last-In-First-Out (LIFO)
Definition at line 44 of file BuddyAllocator.h.
◆ N_blocks()
| size_t BuddyAllocator::N_blocks |
( |
| ) |
const |
|
inlineprivate |
◆ N_bytes()
| size_t BuddyAllocator::N_bytes |
( |
| ) |
const |
|
inlineprivate |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ setLevel()
| void BuddyAllocator::setLevel |
( |
int |
block, |
|
|
int |
level |
|
) |
| |
|
inlineprivate |
◆ d_allocator
| std::function<void *( size_t )> BuddyAllocator::d_allocator |
|
private |
◆ d_deallocator
| std::function<void( void * )> BuddyAllocator::d_deallocator |
|
private |
◆ d_log_N
| uint8_t BuddyAllocator::d_log_N |
|
private |
◆ d_memory
| void* BuddyAllocator::d_memory |
|
private |
◆ d_n
| uint8_t BuddyAllocator::d_n |
|
private |
◆ d_N
◆ d_ptr
| int* BuddyAllocator::d_ptr |
|
private |
◆ d_size
| int8_t* BuddyAllocator::d_size |
|
private |
◆ d_zero
| std::function<void( void *, size_t )> BuddyAllocator::d_zero |
|
private |
The documentation for this class was generated from the following file: