Allows addresses as keys.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2916
/* Looks up a VgHashNode in the table. Also returns the address of
the previous node's `next' pointer which allows it to be removed from the
list later without having to look it up again. */
-VgHashNode* VG_(HT_get_node) ( VgHashTable table, UInt key,
+VgHashNode* VG_(HT_get_node) ( VgHashTable table, UWord key,
/*OUT*/VgHashNode*** next_ptr )
{
VgHashNode *prev, *curr;
HG_Chunk* hc;
HG_Chunk** prev_chunks_next_ptr;
- hc = (HG_Chunk*)VG_(HT_get_node) ( hg_malloc_list, (UInt)p,
+ hc = (HG_Chunk*)VG_(HT_get_node) ( hg_malloc_list, (UWord)p,
(VgHashNode***)&prev_chunks_next_ptr );
if (hc == NULL) {
return;
ThreadId tid = VG_(get_current_or_recent_tid)();
/* First try and find the block. */
- hc = (HG_Chunk*)VG_(HT_get_node) ( hg_malloc_list, (UInt)p,
+ hc = (HG_Chunk*)VG_(HT_get_node) ( hg_malloc_list, (UWord)p,
(VgHashNode***)&prev_chunks_next_ptr );
if (hc == NULL) {
typedef
struct _VgHashNode {
struct _VgHashNode * next;
- UInt key;
+ UWord key;
}
VgHashNode;
/* Looks up a node in the hash table. Also returns the address of the
previous node's `next' pointer which allows it to be removed from the
list later without having to look it up again. */
-extern VgHashNode* VG_(HT_get_node) ( VgHashTable t, UInt key,
+extern VgHashNode* VG_(HT_get_node) ( VgHashTable t, UWord key,
/*OUT*/VgHashNode*** next_ptr );
/* Allocates an array of pointers to all the shadow chunks of malloc'd
static __inline__
HP_Chunk* get_HP_Chunk(void* p, HP_Chunk*** prev_chunks_next_ptr)
{
- return (HP_Chunk*)VG_(HT_get_node) ( malloc_list, (UInt)p,
+ return (HP_Chunk*)VG_(HT_get_node) ( malloc_list, (UWord)p,
(VgHashNode***)prev_chunks_next_ptr );
}
cmalloc_n_frees++;
- mc = (MAC_Chunk*)VG_(HT_get_node) ( MAC_(malloc_list), (UInt)p,
+ mc = (MAC_Chunk*)VG_(HT_get_node) ( MAC_(malloc_list), (UWord)p,
(void*)&prev_chunks_next_ptr );
if (mc == NULL) {
MAC_(record_free_error) ( tid, p );
return NULL;
/* First try and find the block. */
- mc = (MAC_Chunk*)VG_(HT_get_node) ( MAC_(malloc_list), (UInt)p,
+ mc = (MAC_Chunk*)VG_(HT_get_node) ( MAC_(malloc_list), (UWord)p,
(void*)&prev_chunks_next_ptr );
if (mc == NULL) {
MAC_Mempool** prev_next;
mp = (MAC_Mempool*)VG_(HT_get_node) ( MAC_(mempool_list),
- (UInt)pool,
+ (UWord)pool,
(void*)&prev_next );
if (mp == NULL) {
MAC_Mempool* mp;
MAC_Mempool** prev_next;
- mp = (MAC_Mempool*)VG_(HT_get_node) ( MAC_(mempool_list), (UInt)pool,
+ mp = (MAC_Mempool*)VG_(HT_get_node) ( MAC_(mempool_list), (UWord)pool,
(void*)&prev_next );
if (mp == NULL) {
ThreadId tid = VG_(get_current_or_recent_tid)();
- mp = (MAC_Mempool*)VG_(HT_get_node)(MAC_(mempool_list), (UInt)pool,
+ mp = (MAC_Mempool*)VG_(HT_get_node)(MAC_(mempool_list), (UWord)pool,
(void*)&prev_pool);
if (mp == NULL) {
return;
}
- mc = (MAC_Chunk*)VG_(HT_get_node)(mp->chunks, (UInt)addr,
+ mc = (MAC_Chunk*)VG_(HT_get_node)(mp->chunks, (UWord)addr,
(void*)&prev_chunk);
if (mc == NULL) {