
Shared object for several memory areas. More...
#include <memory-manager.hpp>
Public Member Functions | |
| SharedMemory (void) | |
| Initialize. More... | |
| void | flush (void) |
| Flush all cached memory. More... | |
| ~SharedMemory (void) | |
| Destructor. More... | |
| SharedMemory * | copy (bool share) |
| Return copy during cloning. More... | |
| bool | release (void) |
| Release by one space. More... | |
Static Public Member Functions | |
| static void * | operator new (size_t s) |
| Allocate memory from heap. More... | |
| static void | operator delete (void *p) |
| Free memory allocated from heap. More... | |
Region management | |
| bool | region_alloc (size_t s, void *&p) |
| Return memory chunk if available. More... | |
Heap management | |
| HeapChunk * | heap_alloc (size_t s, size_t l) |
| Return heap chunk, preferable of size s, but at least of size l. More... | |
| void | heap_free (HeapChunk *hc) |
| Free heap chunk (or cache for later) More... | |
Shared object for several memory areas.
Definition at line 66 of file memory-manager.hpp.
|
inline |
Initialize.
Definition at line 210 of file memory-manager.hpp.
|
inline |
Destructor.
Definition at line 226 of file memory-manager.hpp.
|
inline |
Flush all cached memory.
Definition at line 217 of file memory-manager.hpp.
|
inline |
Return memory chunk if available.
Definition at line 243 of file memory-manager.hpp.
|
inline |
Return heap chunk, preferable of size s, but at least of size l.
Definition at line 252 of file memory-manager.hpp.
|
inline |
Free heap chunk (or cache for later)
Definition at line 272 of file memory-manager.hpp.
|
inline |
Return copy during cloning.
Definition at line 230 of file memory-manager.hpp.
|
inline |
Release by one space.
Definition at line 239 of file memory-manager.hpp.
|
inlinestatic |
Allocate memory from heap.
Definition at line 202 of file memory-manager.hpp.
|
inlinestatic |
Free memory allocated from heap.
Definition at line 206 of file memory-manager.hpp.
| size_t Gecode::SharedMemory::free |
Amount of free memory.
Definition at line 74 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 76 of file memory-manager.hpp.
| unsigned int Gecode::SharedMemory::n_hc |
How many heap chunks are available for caching.
Definition at line 81 of file memory-manager.hpp.
| HeapChunk* Gecode::SharedMemory::hc |
A list of cached heap chunks.
Definition at line 83 of file memory-manager.hpp.