|
NGSolve 5.3
|
Optimized memory handler. More...
#include <blockalloc.hpp>
Public Member Functions | |
| NGS_DLL_HEADER | BlockAllocator (unsigned int asize, unsigned int ablocks=100) |
| Create BlockAllocator for elements of size asize. | |
| NGS_DLL_HEADER | ~BlockAllocator () |
| Delete all memeory. | |
| NGS_DLL_HEADER void * | Alloc () |
| Return pointer to new element. | |
| NGS_DLL_HEADER void | Free (void *p) |
| Send memory to free-list. | |
| int | NumElements () |
| number of allocated elements | |
| NGS_DLL_HEADER void | Print (ostream *ost) const |
| const MemoryTracer & | GetMemoryTracer () const |
| void | StartMemoryTracing () const |
Optimized memory handler.
Memory handler allocates many objects at once. Maintains free list of deleted objects