From: Philippe E. <ph...@us...> - 2002-12-03 19:41:54
|
Update of /cvsroot/oprofile/oprofile/libdb In directory sc8-pr-cvs1:/tmp/cvs-serv3520/libdb Modified Files: db_debug.c db_stat.c Log Message: support 64 bits size_t regards, Phil Index: db_debug.c =================================================================== RCS file: /cvsroot/oprofile/oprofile/libdb/db_debug.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- db_debug.c 3 Dec 2002 02:53:21 -0000 1.1 +++ db_debug.c 3 Dec 2002 19:41:51 -0000 1.2 @@ -29,7 +29,7 @@ void db_raw_display_hash(samples_db_t const * hash) { - size_t pos; + db_node_nr_t pos; for (pos = 1 ; pos < hash->descr->current_size ; ++pos) { db_node_t const * node = &hash->node_base[pos]; printf("%x %d %d\n", node->key, node->value, node->next); @@ -38,14 +38,14 @@ static int check_circular_list(samples_db_t const * hash) { - size_t pos; + db_node_nr_t pos; int do_abort = 0; unsigned char * bitmap = malloc(hash->descr->current_size); memset(bitmap, '\0', hash->descr->current_size); for (pos = 0 ; pos < hash->descr->size*BUCKET_FACTOR ; ++pos) { - size_t index = hash->hash_base[pos]; + db_index_t index = hash->hash_base[pos]; if (index && !do_abort) { while (index) { if (bitmap[index]) { @@ -90,7 +90,7 @@ static int check_redundant_key(samples_db_t const * hash, db_key_t max) { - size_t pos; + db_node_nr_t pos; unsigned char * bitmap = malloc(max + 1); memset(bitmap, '\0', max + 1); @@ -110,14 +110,14 @@ int db_check_hash(samples_db_t const * hash) { - size_t pos; - size_t nr_node = 0; - size_t nr_node_out_of_bound = 0; + db_node_nr_t pos; + db_node_nr_t nr_node = 0; + db_node_nr_t nr_node_out_of_bound = 0; int ret = 0; db_key_t max = 0; for (pos = 0 ; pos < hash->descr->size * BUCKET_FACTOR ; ++pos) { - size_t index = hash->hash_base[pos]; + db_index_t index = hash->hash_base[pos]; while (index) { if (index >= hash->descr->current_size) { nr_node_out_of_bound++; Index: db_stat.c =================================================================== RCS file: /cvsroot/oprofile/oprofile/libdb/db_stat.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- db_stat.c 3 Dec 2002 02:53:21 -0000 1.1 +++ db_stat.c 3 Dec 2002 19:41:51 -0000 1.2 @@ -17,7 +17,7 @@ db_node_nr_t node_nr; db_node_nr_t used_node_nr; db_index_t hash_table_size; - size_t max_list_length; /**< worst case */ + db_node_nr_t max_list_length; /**< worst case */ double average_list_length; /**< average case */ /* do we need variance ? */ }; |