Global memory allocator. More...
#include <GlobalAllocator.hpp>
Public Member Functions | |
GlobalAllocator (GlobalAddress< void > base, size_t size) | |
Construct global allocator. More... | |
std::ostream & | dump (std::ostream &o) const |
human-readable allocator state (not to be called directly—called by 'operator<<' overload) More... | |
size_t | total_bytes () const |
Number of bytes available for allocation;. More... | |
size_t | total_bytes_in_use () const |
Number of bytes allocated. More... | |
Static Public Member Functions | |
static GlobalAddress< void > | remote_malloc (size_t size_bytes) |
delegate malloc More... | |
static void | remote_free (GlobalAddress< void > address) |
delegate free TODO: should free block? More... | |
Global memory allocator.
Definition at line 52 of file GlobalAllocator.hpp.
|
inline |
Construct global allocator.
Allocates no storage, just controls ownership of memory region.
base | base address of region to allocate from |
size | number of bytes available for allocation |
Definition at line 85 of file GlobalAllocator.hpp.
|
inline |
human-readable allocator state (not to be called directly—called by 'operator<<' overload)
Definition at line 127 of file GlobalAllocator.hpp.
|
inlinestatic |
delegate free TODO: should free block?
Definition at line 113 of file GlobalAllocator.hpp.
|
inlinestatic |
delegate malloc
Definition at line 100 of file GlobalAllocator.hpp.
|
inline |
Number of bytes available for allocation;.
Definition at line 136 of file GlobalAllocator.hpp.
|
inline |
Number of bytes allocated.
Definition at line 138 of file GlobalAllocator.hpp.