Memory pool.
More...
#include <Sacado_Fad_MemPool.hpp>
|
| MemPool (unsigned int elem_size, unsigned int n_elem, unsigned int pre_alloc=0) |
| Constructor. elem_size is the size of elements, n_elem is the number of elements per chunk. pre_alloc is the number of chunks to pre-allocate. More...
|
|
| ~MemPool () |
| Destructor. More...
|
|
void * | alloc () |
| Allocate a new element. More...
|
|
void | free (void *b) |
| Free an element. More...
|
|
unsigned int | numChunks () const |
| Return number of allocated chunks. More...
|
|
Memory pool.
Definition at line 40 of file Sacado_Fad_MemPool.hpp.
◆ MemPool() [1/2]
Sacado::Fad::MemPool::MemPool |
( |
unsigned int |
elem_size, |
|
|
unsigned int |
n_elem, |
|
|
unsigned int |
pre_alloc = 0 |
|
) |
| |
|
inline |
Constructor. elem_size
is the size of elements, n_elem
is the number of elements per chunk. pre_alloc
is the number of chunks to pre-allocate.
Definition at line 35 of file Sacado_Fad_MemPoolImp.hpp.
◆ ~MemPool()
Sacado::Fad::MemPool::~MemPool |
( |
| ) |
|
|
inline |
◆ MemPool() [2/2]
Sacado::Fad::MemPool::MemPool |
( |
const MemPool & |
| ) |
|
|
private |
Private to prohibit copying.
◆ alloc()
void * Sacado::Fad::MemPool::alloc |
( |
| ) |
|
|
inline |
◆ free()
void Sacado::Fad::MemPool::free |
( |
void * |
b | ) |
|
|
inline |
◆ numChunks()
unsigned int Sacado::Fad::MemPool::numChunks |
( |
| ) |
const |
|
inline |
◆ operator=()
Private to prohibit copying.
◆ grow()
void Sacado::Fad::MemPool::grow |
( |
| ) |
|
|
inlineprivate |
◆ esize
const unsigned int Sacado::Fad::MemPool::esize |
|
protected |
const unsigned int Sacado::Fad::MemPool::n |
|
protected |
◆ csize
const unsigned int Sacado::Fad::MemPool::csize |
|
protected |
◆ chunks
Chunk* Sacado::Fad::MemPool::chunks |
|
protected |
◆ head
Link* Sacado::Fad::MemPool::head |
|
protected |
◆ num_chunks
unsigned int Sacado::Fad::MemPool::num_chunks |
|
protected |
The documentation for this class was generated from the following files: