|
join 1.0
lightweight network framework library
|
memory arena owning backend and managing one or more pools. More...
#include <allocator.hpp>
Public Member Functions | |
| template<typename... Args> | |
| BasicArena (Args &&... args) | |
| create instance. | |
| BasicArena (const BasicArena &other)=delete | |
| copy constructor. | |
| BasicArena & | operator= (const BasicArena &other)=delete |
| copy assignment operator. | |
| BasicArena (BasicArena &&other) noexcept | |
| move constructor. | |
| BasicArena & | operator= (BasicArena &&other) noexcept |
| move assignment operator. | |
| ~BasicArena ()=default | |
| destroy instance. | |
| void * | allocate (size_t size) noexcept |
| allocate memory from the first pool that fits (promotes if exhausted). | |
| void * | tryAllocate (size_t size) noexcept |
| allocate memory from the exact pool that fits, without promotion. | |
| void | deallocate (void *p) noexcept |
| return memory to the appropriate pool. | |
| int | mbind (int numa) const noexcept |
| bind memory to a NUMA node. | |
| int | mlock () const noexcept |
| lock memory in RAM. | |
Static Public Attributes | |
| static constexpr size_t | _total = TotalSize<Count, Sizes...>::value |
| total bytes required in the mapped region. | |
memory arena owning backend and managing one or more pools.
allocator forward declarations.
|
inline |
create instance.
| args | arguments forwarded to the backend. |
|
delete |
copy constructor.
| other | other object to copy. |
|
inlinenoexcept |
move constructor.
| other | other object to move. |
|
default |
destroy instance.
|
inlinenoexcept |
allocate memory from the first pool that fits (promotes if exhausted).
| size | size of the allocation request in bytes. |
|
inlinenoexcept |
return memory to the appropriate pool.
| p | pointer to the memory to return. |
|
inlinenoexcept |
bind memory to a NUMA node.
| numa | NUMA node ID. |
|
inlinenoexcept |
lock memory in RAM.
|
inlinenoexcept |
move assignment operator.
| other | other object to move. |
|
delete |
copy assignment operator.
| other | other object to copy. |
|
inlinenoexcept |
allocate memory from the exact pool that fits, without promotion.
| size | size of the allocation request in bytes. |
|
staticconstexpr |
total bytes required in the mapped region.