PKUOS - Pintos
Pintos source browser for PKU Operating System course
Data Fields
hash Struct Reference

Hash table. More...

#include <hash.h>

Collaboration diagram for hash:
Collaboration graph
[legend]

Data Fields

size_t elem_cnt
 Number of elements in table. More...
 
size_t bucket_cnt
 Number of buckets, a power of 2. More...
 
struct listbuckets
 Array of ‘bucket_cnt’ lists. More...
 
hash_hash_funchash
 Hash function. More...
 
hash_less_funcless
 Comparison function. More...
 
void * aux
 Auxiliary data for ‘hash’ and ‘less’. More...
 

Detailed Description

Hash table.

Definition at line 59 of file hash.h.

Field Documentation

◆ aux

void* hash::aux

Auxiliary data for ‘hash’ and ‘less’.

Definition at line 66 of file hash.h.

Referenced by find_bucket(), find_elem(), hash_apply(), hash_clear(), and hash_init().

◆ bucket_cnt

size_t hash::bucket_cnt

Number of buckets, a power of 2.

Definition at line 62 of file hash.h.

Referenced by find_bucket(), hash_apply(), hash_clear(), hash_init(), hash_next(), and rehash().

◆ buckets

struct list* hash::buckets

Array of ‘bucket_cnt’ lists.

Definition at line 63 of file hash.h.

Referenced by find_bucket(), hash_apply(), hash_clear(), hash_destroy(), hash_first(), hash_init(), hash_next(), and rehash().

◆ elem_cnt

size_t hash::elem_cnt

Number of elements in table.

Definition at line 61 of file hash.h.

Referenced by hash_clear(), hash_empty(), hash_init(), hash_size(), insert_elem(), rehash(), and remove_elem().

◆ hash

hash_hash_func* hash::hash

Hash function.

Definition at line 64 of file hash.h.

Referenced by find_bucket(), and hash_init().

◆ less

hash_less_func* hash::less

Comparison function.

Definition at line 65 of file hash.h.

Referenced by find_elem(), and hash_init().


The documentation for this struct was generated from the following file: