NGSolve  4.9
Public Member Functions
ngstd::BlockAllocator Class Reference

Optimized memory handler. More...

#include <blockalloc.hpp>

List of all members.

Public Member Functions

 BlockAllocator (unsigned int asize, unsigned int ablocks=100)
 Create BlockAllocator for elements of size asize.
 ~BlockAllocator ()
 Delete all memeory.
void * Alloc ()
 Return pointer to new element.
void Free (void *p)
 Send memory to free-list.
int NumElements ()
 number of allocated elements
void Print (ostream *ost) const

Detailed Description

Optimized memory handler.

Memory handler allocates many objects at once. Maintains free list of deleted objects


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