Pool allocator. More...
#include <MemoryPool.h>
Public Member Functions | |
| TYPE * | allocate () |
| Allocate an object. | |
| void | free (TYPE *ptr) |
| Insert an item. | |
| MemoryPool (size_t size) | |
| Default constructor. | |
| ~MemoryPool () | |
| destructor | |
Private Member Functions | |
| MemoryPool (const MemoryPool &) | |
| MemoryPool & | operator= (const MemoryPool &) |
Private Attributes | |
| volatile AtomicOperations::int32_atomic | d_next |
| volatile TYPE * | d_objects |
Pool allocator.
This class implements a basic fast pool allocator that is thread-safe.
Definition at line 14 of file MemoryPool.h.
|
explicit |
Default constructor.
| AMP::MemoryPool< TYPE, INT_TYPE >::~MemoryPool | ( | ) |
destructor
|
private |
|
inline |
Allocate an object.
Allocates a new object from the pool
|
inline |
Insert an item.
Insert an item into the list
| ptr | The pointer to free |
|
private |
|
private |
Definition at line 40 of file MemoryPool.h.
|
private |
Definition at line 39 of file MemoryPool.h.
|
Advanced Multi-Physics (AMP) Oak Ridge National Laboratory Idaho National Laboratory Los Alamos National Laboratory |
This page automatically produced from the source code by Last updated: Tue Mar 10 2026 13:06:42. Comments on this page |