unsigned int granularity
the granularity
Definition: memblockvec.hh:90
unsigned int get_granularity(void) const
return granularity
Definition: memblockvec.hh:65
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 ...
r_Bytes blockSize
the size of the blocks
Definition: memblockvec.hh:88
~r_Memory_Block_Vector(void)
destructor
void ** blocks
the array of memory block pointers
Definition: memblockvec.hh:84
unsigned int get_number(void) const
return number of blocks
Definition: memblockvec.hh:55
r_Bytes get_size(r_Bytes lastFill) const
get number of bytes stored. lastFill is the number of bytes used in the last block ...
void * operator[](unsigned int idx) const
get a block
unsigned int maxBlocks
Definition: memblockvec.hh:86
Definition: memblockvec.hh:46
void * add(void)
add a new block and return a pointer to it
void free_data(void)
free all blocks (but not the vector, call the destructor for that)
unsigned int numBlocks
Definition: memblockvec.hh:85
unsigned int r_Bytes
Definition: mddtypes.hh:56
r_Bytes get_block_size(void) const
return block size
Definition: memblockvec.hh:60
void 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...