fprint_hash_mem | hash_destroy | hash_insert | p_hash_mem |
hash_delete | hash_init | hash_lookup |
void fprint_hash_mem(FILE *fp, BOOL heading);This routine prints (to FILE *fp) memory usage statistics for data types associated with hash. The Boolean argument heading tells whether to print a heading on the table.
void hash_delete(int id, Hashtab h);Delete the pair (ID, void *) for the given integer ID. If the ID is not in the table, nothing happens.
void hash_destroy(Hashtab h);Free all of the memory used by the given hash table. Do not refer to the table after calling this routine. The hash table need not be empty;
Hashtab hash_init(int size);Allocate and initialize a hash table of the given size.
void hash_insert(int id, void *v, Hashtab h);Insert a pair (integer, void *) into a hash table. If the integer is already there, a fatal error occurs.
void * hash_lookup(int id, Hashtab h);Find and return the pointer associated with the given integer ID. If the ID is not in the table, NULL is returned.
void p_hash_mem();This routine prints (to stdout) memory usage statistics for data types associated .
One can insert and delete pairs (integer ID, void *pointer), and retrieve the pointer associated with a given ID.
These activities are projects of the Mathematics and Computer Science Division of Argonne National Laboratory.