Logo
ApraPipes 1.0
Loading...
Searching...
No Matches
ApraPool< UserAllocator > Class Template Reference

#include <ApraPool.h>

Inheritance diagram for ApraPool< UserAllocator >:
Inheritance graph
Collaboration diagram for ApraPool< UserAllocator >:
Collaboration graph

Public Member Functions

 ApraPool (const size_t nRequestedSize, const size_t nnext_size=32, const size_t nmax_size=0)
 
virtual ~ApraPool ()
 
void * ordered_malloc (const size_t n)
 
void ordered_free (void *ptr, const size_t n)
 
bool release_memory ()
 
bool purge_memory ()
 

Private Member Functions

bool is_from (void *const chunk, char *const start, char *const end)
 
ApraSegregatedStoragestore ()
 
const ApraSegregatedStoragestore () const
 

Private Attributes

const size_t requested_size
 
size_t start_size
 
size_t next_size
 
size_t max_size
 
ApraNodelist
 
boost::object_pool< ApraNodenode_opool
 

Additional Inherited Members

- Protected Member Functions inherited from ApraSegregatedStorage
bool empty () const
 
ApraChunksegregate (void *block, size_t sz, size_t partition_sz, ApraChunk *end=nullptr)
 
ApraChunkfind_prev (void *const ptr)
 
ApraChunktry_malloc_n (ApraChunk *&start, size_t n, const size_t partition_size)
 
ApraChunkgetFreeApraChunk ()
 
void addToJunk (ApraChunk *start, ApraChunk *end)
 
void releaseChunks ()
 
 ApraSegregatedStorage ()
 
virtual ~ApraSegregatedStorage ()
 
void * malloc_n (const size_t n, const size_t partition_size)
 
void add_ordered_block (void *const block, const size_t nsz, const size_t npartition_sz)
 
void ordered_free_n (void *const chunks, const size_t n, const size_t partition_size)
 
- Protected Attributes inherited from ApraSegregatedStorage
ApraChunkfirst
 
ApraChunkjunkList
 
boost::object_pool< ApraChunkchunk_opool
 

Constructor & Destructor Documentation

◆ ApraPool()

template<typename UserAllocator >
ApraPool< UserAllocator >::ApraPool ( const size_t nRequestedSize,
const size_t nnext_size = 32,
const size_t nmax_size = 0 )
explicit

◆ ~ApraPool()

template<typename UserAllocator >
ApraPool< UserAllocator >::~ApraPool ( )
virtual

Destructs the Pool, freeing its list of memory blocks.

Member Function Documentation

◆ is_from()

template<typename UserAllocator >
bool ApraPool< UserAllocator >::is_from ( void *const chunk,
char *const start,
char *const end )
private

◆ ordered_free()

template<typename UserAllocator >
void ApraPool< UserAllocator >::ordered_free ( void * ptr,
const size_t n )

◆ ordered_malloc()

template<typename UserAllocator >
void * ApraPool< UserAllocator >::ordered_malloc ( const size_t n)
Here is the call graph for this function:

◆ purge_memory()

template<typename UserAllocator >
bool ApraPool< UserAllocator >::purge_memory ( )
Here is the call graph for this function:

◆ release_memory()

template<typename UserAllocator >
bool ApraPool< UserAllocator >::release_memory ( )
Here is the call graph for this function:

◆ store() [1/2]

template<typename UserAllocator >
ApraSegregatedStorage & ApraPool< UserAllocator >::store ( )
inlineprivate

◆ store() [2/2]

template<typename UserAllocator >
const ApraSegregatedStorage & ApraPool< UserAllocator >::store ( ) const
inlineprivate

Member Data Documentation

◆ list

template<typename UserAllocator >
ApraNode* ApraPool< UserAllocator >::list
private

◆ max_size

template<typename UserAllocator >
size_t ApraPool< UserAllocator >::max_size
private

◆ next_size

template<typename UserAllocator >
size_t ApraPool< UserAllocator >::next_size
private

◆ node_opool

template<typename UserAllocator >
boost::object_pool<ApraNode> ApraPool< UserAllocator >::node_opool
private

◆ requested_size

template<typename UserAllocator >
const size_t ApraPool< UserAllocator >::requested_size
private

◆ start_size

template<typename UserAllocator >
size_t ApraPool< UserAllocator >::start_size
private

The documentation for this class was generated from the following file: