Open
Graph Drawing
Framework

 v.2012.05
 

ogdf::MallocMemoryAllocator Class Reference

Implements a simple memory manager using malloc() and free(). More...

#include <ogdf/internal/basic/MallocMemoryAllocator.h>

List of all members.

Public Member Functions

 MallocMemoryAllocator ()
 ~MallocMemoryAllocator ()

Static Public Member Functions

static void init ()
static void initThread ()
static void cleanup ()
static bool checkSize (size_t)
static void * allocate (size_t nBytes, const char *, int)
 Allocates memory of size nBytes.
static void * allocate (size_t nBytes)
 Allocates memory of size nBytes.
static void deallocate (size_t, void *p)
 Deallocates memory at address p which is of size nBytes.
static void deallocateList (size_t, void *pHead, void *pTail)
 Deallocate a complete list starting at pHead and ending at pTail.
static void flushPool ()
static void flushPool (__uint16)
static size_t memoryAllocatedInBlocks ()
 Always returns 0, since no blocks are allocated.
static size_t memoryInFreelist ()
 Always returns 0, since no blocks are allocated.

Detailed Description

Implements a simple memory manager using malloc() and free().

Definition at line 55 of file MallocMemoryAllocator.h.


Constructor & Destructor Documentation


Member Function Documentation

static void* ogdf::MallocMemoryAllocator::allocate ( size_t  nBytes,
const char *  ,
int   
) [inline, static]

Allocates memory of size nBytes.

Definition at line 69 of file MallocMemoryAllocator.h.

static void* ogdf::MallocMemoryAllocator::allocate ( size_t  nBytes) [inline, static]

Allocates memory of size nBytes.

Definition at line 72 of file MallocMemoryAllocator.h.

static bool ogdf::MallocMemoryAllocator::checkSize ( size_t  ) [inline, static]

Definition at line 66 of file MallocMemoryAllocator.h.

static void ogdf::MallocMemoryAllocator::cleanup ( ) [inline, static]

Definition at line 64 of file MallocMemoryAllocator.h.

static void ogdf::MallocMemoryAllocator::deallocate ( size_t  ,
void *  p 
) [inline, static]

Deallocates memory at address p which is of size nBytes.

Definition at line 81 of file MallocMemoryAllocator.h.

static void ogdf::MallocMemoryAllocator::deallocateList ( size_t  ,
void *  pHead,
void *  pTail 
) [inline, static]

Deallocate a complete list starting at pHead and ending at pTail.

The elements are assumed to be chained using the first word of each element and elements are of size nBytes.

Definition at line 88 of file MallocMemoryAllocator.h.

static void ogdf::MallocMemoryAllocator::flushPool ( ) [inline, static]

Definition at line 98 of file MallocMemoryAllocator.h.

static void ogdf::MallocMemoryAllocator::flushPool ( __uint16  ) [inline, static]

Definition at line 99 of file MallocMemoryAllocator.h.

static void ogdf::MallocMemoryAllocator::init ( ) [inline, static]

Definition at line 62 of file MallocMemoryAllocator.h.

static void ogdf::MallocMemoryAllocator::initThread ( ) [inline, static]

Definition at line 63 of file MallocMemoryAllocator.h.

static size_t ogdf::MallocMemoryAllocator::memoryAllocatedInBlocks ( ) [inline, static]

Always returns 0, since no blocks are allocated.

Definition at line 102 of file MallocMemoryAllocator.h.

static size_t ogdf::MallocMemoryAllocator::memoryInFreelist ( ) [inline, static]

Always returns 0, since no blocks are allocated.

Definition at line 105 of file MallocMemoryAllocator.h.


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