Bitcoin Core 28.99.0
P2P Digital Currency
|
Forwards all allocations/deallocations to the PoolResource. More...
#include <pool.h>
Classes | |
struct | rebind |
The rebind struct here is mandatory because we use non type template arguments for PoolAllocator. More... | |
Public Types | |
using | value_type = T |
using | ResourceType = PoolResource< MAX_BLOCK_SIZE_BYTES, ALIGN_BYTES > |
Public Member Functions | |
PoolAllocator (ResourceType *resource) noexcept | |
Not explicit so we can easily construct it with the correct resource. More... | |
PoolAllocator (const PoolAllocator &other) noexcept=default | |
PoolAllocator & | operator= (const PoolAllocator &other) noexcept=default |
template<class U > | |
PoolAllocator (const PoolAllocator< U, MAX_BLOCK_SIZE_BYTES, ALIGN_BYTES > &other) noexcept | |
T * | allocate (size_t n) |
Forwards each call to the resource. More... | |
void | deallocate (T *p, size_t n) noexcept |
Forwards each call to the resource. More... | |
ResourceType * | resource () const noexcept |
Private Attributes | |
PoolResource< MAX_BLOCK_SIZE_BYTES, ALIGN_BYTES > * | m_resource |
Friends | |
template<typename U , std::size_t M, std::size_t A> | |
class | PoolAllocator |
Forwards all allocations/deallocations to the PoolResource.
using PoolAllocator< T, MAX_BLOCK_SIZE_BYTES, ALIGN_BYTES >::ResourceType = PoolResource<MAX_BLOCK_SIZE_BYTES, ALIGN_BYTES> |
using PoolAllocator< T, MAX_BLOCK_SIZE_BYTES, ALIGN_BYTES >::value_type = T |
|
inlinenoexcept |
|
defaultnoexcept |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
defaultnoexcept |
|
inlinenoexcept |
|
friend |
|
private |