Manage memory for space. More...
#include <memory-manager.hpp>
Public Member Functions | |
MemoryManager (SharedMemory *sm) | |
Constructor initialization. More... | |
MemoryManager (SharedMemory *sm, MemoryManager &mm, size_t s_sub) | |
Constructor during cloning mm with shared memory sm and for a memory area for subscriptions of size s_sub. More... | |
void | release (SharedMemory *sm) |
Release all allocated heap chunks. More... | |
void * | alloc (SharedMemory *sm, size_t s) |
Allocate memory of size s. More... | |
size_t | allocated (void) const |
Return how much memory has been allocated. More... | |
void * | subscriptions (void) const |
Get the memory area for subscriptions. More... | |
template<size_t s> | |
void * | fl_alloc (SharedMemory *sm) |
Allocate free list element of size s. More... | |
template<size_t > | |
void | fl_dispose (FreeList *f, FreeList *l) |
Release all free list elements of size s between f and l (inclusive) More... | |
void | reuse (void *p, size_t s) |
Store for reusal, if of sufficient size for free list. More... | |
Manage memory for space.
Definition at line 141 of file memory-manager.hpp.
|
inline |
Constructor initialization.
Definition at line 385 of file memory-manager.hpp.
|
inline |
Constructor during cloning mm with shared memory sm and for a memory area for subscriptions of size s_sub.
Definition at line 394 of file memory-manager.hpp.
|
inline |
Release all allocated heap chunks.
Definition at line 412 of file memory-manager.hpp.
|
inline |
Allocate memory of size s.
Definition at line 335 of file memory-manager.hpp.
|
inline |
Return how much memory has been allocated.
Definition at line 330 of file memory-manager.hpp.
|
inline |
Get the memory area for subscriptions.
Definition at line 347 of file memory-manager.hpp.
|
inline |
Allocate free list element of size s.
Definition at line 460 of file memory-manager.hpp.
Release all free list elements of size s between f and l (inclusive)
Definition at line 473 of file memory-manager.hpp.
|
inline |
Store for reusal, if of sufficient size for free list.
Definition at line 428 of file memory-manager.hpp.