Generated on Thu Mar 22 10:39:53 2012 for Gecode by doxygen 1.6.3

Gecode::SharedMemory Class Reference

Shared object for several memory areas. More...

#include <memory-manager.hpp>

List of all members.

Public Member Functions

 SharedMemory (void)
 Initialize.
void flush (void)
 Flush all cached memory.
 ~SharedMemory (void)
 Destructor.
SharedMemorycopy (bool share)
 Return copy during cloning.
bool release (void)
 Release by one space.

Static Public Member Functions

static void * operator new (size_t s)
 Allocate memory from heap.
static void operator delete (void *p)
 Free memory allocated from heap.

Region management



bool region_alloc (size_t s, void *&p)
 Return memory chunk if available.

Heap management



HeapChunkheap_alloc (size_t s, size_t l)
 Return heap chunk, preferable of size s, but at least of size l.
void heap_free (HeapChunk *hc)
 Free heap chunk (or cache for later).

Detailed Description

Shared object for several memory areas.

Definition at line 63 of file memory-manager.hpp.


Constructor & Destructor Documentation

Gecode::SharedMemory::SharedMemory ( void   )  [inline]

Initialize.

Definition at line 209 of file memory-manager.hpp.

Gecode::SharedMemory::~SharedMemory ( void   )  [inline]

Destructor.

Definition at line 225 of file memory-manager.hpp.


Member Function Documentation

void Gecode::SharedMemory::flush ( void   )  [inline]

Flush all cached memory.

Definition at line 216 of file memory-manager.hpp.

bool Gecode::SharedMemory::region_alloc ( size_t  s,
void *&  p 
) [inline]

Return memory chunk if available.

Definition at line 242 of file memory-manager.hpp.

HeapChunk * Gecode::SharedMemory::heap_alloc ( size_t  s,
size_t  l 
) [inline]

Return heap chunk, preferable of size s, but at least of size l.

Definition at line 251 of file memory-manager.hpp.

void Gecode::SharedMemory::heap_free ( HeapChunk hc  )  [inline]

Free heap chunk (or cache for later).

Definition at line 271 of file memory-manager.hpp.

SharedMemory * Gecode::SharedMemory::copy ( bool  share  )  [inline]

Return copy during cloning.

Definition at line 229 of file memory-manager.hpp.

bool Gecode::SharedMemory::release ( void   )  [inline]

Release by one space.

Definition at line 238 of file memory-manager.hpp.

void * Gecode::SharedMemory::operator new ( size_t  s  )  [inline, static]

Allocate memory from heap.

Definition at line 201 of file memory-manager.hpp.

void Gecode::SharedMemory::operator delete ( void *  p  )  [inline, static]

Free memory allocated from heap.

Definition at line 205 of file memory-manager.hpp.


Member Data Documentation

Amount of free memory.

Definition at line 71 of file memory-manager.hpp.

The actual memory area (allocated from top to bottom).

Definition at line 73 of file memory-manager.hpp.

How many heap chunks are available for caching.

Definition at line 78 of file memory-manager.hpp.

A list of cached heap chunks.

Definition at line 80 of file memory-manager.hpp.


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