Otawa
0.10
|
This class is used to retrieve quickly blocks from their containing address. More...
#include <otawa/util/MemBlockMap.h>
Classes | |
struct | node_t |
Public Member Functions | |
MemBlockMap (ot::size block_size=32, t::size table_size=211) | |
Build a memory block map. More... | |
~MemBlockMap (void) | |
void | clear (void) |
Clear the content of map. More... | |
void | add (const T *block) |
Add a block to the map. More... | |
const T * | get (Address address) |
Find a block by its address. More... | |
Private Types | |
typedef struct otawa::MemBlockMap::node_t | node_t |
Private Attributes | |
ot::size | pow |
ot::size | bsize |
ot::size | tsize |
node_t ** | nodes |
This class is used to retrieve quickly blocks from their containing address.
Stored blocks must match the Block concept of OTAWA:
T | Type of stored memory blocks. |
|
private |
|
inline |
Build a memory block map.
block_size | Average size of the stored blocks. |
table_size | Hash table size (better if it is a prime number). |
|
inline |
|
inline |
Add a block to the map.
block | Block to add. |
|
inline |
Clear the content of map.
Referenced by otawa::MemBlockMap< otawa::BasicBlock >::~MemBlockMap().
|
inline |
Find a block by its address.
address | Address of the block to get. |
|
private |
Referenced by otawa::MemBlockMap< otawa::BasicBlock >::add().
|
private |
|
private |
|
private |