|
Sacado Package Browser (Single Doxygen Collection)
Version of the Day
|
Go to the documentation of this file.
32 #ifndef SACADO_FAD_MEMPOOL_HPP
33 #define SACADO_FAD_MEMPOOL_HPP
49 MemPool(
unsigned int elem_size,
unsigned int n_elem,
50 unsigned int pre_alloc = 0);
115 #endif // SACADO_FAD_MEMPOOL_HPP
MemPool(const MemPool &)
Private to prohibit copying.
Chunk * chunks
Pointer to memory chunks.
const unsigned int n
Number of elements per chunk.
Represents a memory chunk.
unsigned int numChunks() const
Return number of allocated chunks.
void * alloc()
Allocate a new element.
Link * head
Pointer to first free link.
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....
Represents a memory element.
void grow()
Allocate a new chunk.
MemPool & operator=(const MemPool &)
Private to prohibit copying.
const unsigned int csize
Size of memory chunks.
void free(void *b)
Free an element.
unsigned int num_chunks
Number of allocated chunks.
const unsigned int esize
Size of elements in a chunk.