Gecode::SharedMemory Class Reference
Shared object for several memory areas. More...
#include <memory-manager.hpp>
Public Member Functions | |
SharedMemory (void) | |
Initialize. | |
void | flush (void) |
Flush all cached memory. | |
~SharedMemory (void) | |
Destructor. | |
SharedMemory * | copy (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 | |
| |
HeapChunk * | heap_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
size_t Gecode::SharedMemory::free |
Amount of free memory.
Definition at line 71 of file memory-manager.hpp.
double Gecode::SharedMemory::area[MemoryConfig::region_area_size/sizeof(double)] |
The actual memory area (allocated from top to bottom).
Definition at line 73 of file memory-manager.hpp.
unsigned int Gecode::SharedMemory::n_hc |
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:
- gecode/kernel/memory-manager.hpp (Revision: 9692)