From: Ben Pfaff Date: Wed, 5 Apr 2006 19:22:43 +0000 (+0000) Subject: Add references to tour of pintos. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61e430fe8ea929b79dfd992bfbecb651a9d6457e;p=pintos-anon Add references to tour of pintos. --- diff --git a/src/lib/kernel/hash.c b/src/lib/kernel/hash.c index 55e01c4..57eed45 100644 --- a/src/lib/kernel/hash.c +++ b/src/lib/kernel/hash.c @@ -1,3 +1,10 @@ +/* Hash table. + + This data structure is thoroughly documented in the Tour of + Pintos for Project 3. + + See hash.h for basic information. */ + #include "hash.h" #include "../debug.h" #include "threads/malloc.h" diff --git a/src/lib/kernel/hash.h b/src/lib/kernel/hash.h index 7f25c10..3f2e43c 100644 --- a/src/lib/kernel/hash.h +++ b/src/lib/kernel/hash.h @@ -3,6 +3,9 @@ /* Hash table. + This data structure is thoroughly documented in the Tour of + Pintos for Project 3. + This is a standard hash table with chaining. To locate an element in the table, we compute a hash function over the element's data and use that as an index into an array of @@ -15,10 +18,7 @@ conversion from a struct hash_elem back to a structure object that contains it. This is the same technique used in the linked list implementation. Refer to lib/kernel/list.h for a - detailed explanation. - - The FAQ for the VM project contains a detailed example of how - to use the hash table. */ + detailed explanation. */ #include #include