#include <memblockvec.hh>
r_Memory_Block_Vector::r_Memory_Block_Vector |
( |
r_Bytes |
bsize = 4096 , |
|
|
unsigned int |
gran = 8 |
|
) |
| |
constructor, receiving the size of each memory block and the granularity for extending the number of blocks.
r_Memory_Block_Vector::~r_Memory_Block_Vector |
( |
void |
| ) |
|
void* r_Memory_Block_Vector::add |
( |
void |
| ) |
|
add a new block and return a pointer to it
void r_Memory_Block_Vector::copy_data |
( |
void * |
dest, |
|
|
r_Bytes |
lastFill |
|
) |
| const |
Copy the data stored in blocks into linear memory. lastFill is the number of bytes in the last block.
void r_Memory_Block_Vector::free_data |
( |
void |
| ) |
|
free all blocks (but not the vector, call the destructor for that)
r_Bytes r_Memory_Block_Vector::get_block_size |
( |
void |
| ) |
const |
|
inline |
unsigned int r_Memory_Block_Vector::get_granularity |
( |
void |
| ) |
const |
|
inline |
unsigned int r_Memory_Block_Vector::get_number |
( |
void |
| ) |
const |
|
inline |
return number of blocks
References numBlocks.
get number of bytes stored. lastFill is the number of bytes used in the last block
void* r_Memory_Block_Vector::operator[] |
( |
unsigned int |
idx | ) |
const |
void** r_Memory_Block_Vector::blocks |
|
protected |
the array of memory block pointers
r_Bytes r_Memory_Block_Vector::blockSize |
|
protected |
unsigned int r_Memory_Block_Vector::granularity |
|
protected |
unsigned int r_Memory_Block_Vector::maxBlocks |
|
protected |
unsigned int r_Memory_Block_Vector::numBlocks |
|
protected |
The documentation for this class was generated from the following file: