NGSolve  5.3
Public Member Functions
ngstd::BlockAllocator Class Reference

Optimized memory handler. More...

#include <blockalloc.hpp>

List of all members.

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

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: