Jpp 19.3.0-rc.1
the software that should make you happy
|
Memory management for small objects. More...
#include <JRAM.hh>
Public Member Functions | |
JRAM (const std::size_t block_size, const std::size_t number_of_blocks=65536) | |
Constructor. | |
~JRAM () | |
Destructor. | |
long long int | getTotalRAM () |
Get total used RAM. | |
long long int | getFreeRAM () |
Get total free RAM. | |
void * | allocate () |
Allocate memory. | |
void | free (void *p) |
Deallocate memory. | |
void | gc () |
Run garbage collector. | |
Private Member Functions | |
void | addMemory () |
Add memory. | |
JRAM (const JRAM &) | |
JRAM (JRAM &&) | |
JRAM & | operator= (const JRAM &) |
JRAM & | operator= (JRAM &&) |
Private Attributes | |
const std::size_t | BLOCK_SIZE |
const std::size_t | numberOfBlocks |
std::vector< unsigned char * > | memory |
Memory management for small objects.
This object allocator is optimised for speed at the cost of some memory overhead.
|
inline |
Constructor.
block_size | number of bytes |
number_of_blocks | number of blocks |
Definition at line 67 of file JRAM.hh.
|
inline |
|
private |
|
private |
|
inlineprivate |
Add memory.
Definition at line 37 of file JRAM.hh.
|
inline |
Get total used RAM.
|
inline |
Get total free RAM.
|
inline |
|
inline |
|
inline |
Run garbage collector.
Definition at line 141 of file JRAM.hh.
|
private |