-typedef int HashFunction(HashTable *table, StgWord key);
-typedef int CompareFunction(StgWord key1, StgWord key2);
+typedef struct chunklist {
+ HashList *chunk;
+ struct chunklist *next;
+} HashListChunk;
int kcount; /* Number of keys */
int bcount; /* Number of buckets */
HashList **dir[HDIRSIZE]; /* Directory of segments */
int kcount; /* Number of keys */
int bcount; /* Number of buckets */
HashList **dir[HDIRSIZE]; /* Directory of segments */
* next bucket to be split, re-hash using the larger table.
* -------------------------------------------------------------------------- */
* next bucket to be split, re-hash using the larger table.
* -------------------------------------------------------------------------- */
* no effort to actually return the space to the malloc arena.
* -------------------------------------------------------------------------- */
* no effort to actually return the space to the malloc arena.
* -------------------------------------------------------------------------- */
/* The last bucket with something in it is table->max + table->split - 1 */
segment = (table->max + table->split - 1) / HSEGSIZE;
/* The last bucket with something in it is table->max + table->split - 1 */
segment = (table->max + table->split - 1) / HSEGSIZE;
* initializing all of the first segment's hash buckets to NULL.
* -------------------------------------------------------------------------- */
* initializing all of the first segment's hash buckets to NULL.
* -------------------------------------------------------------------------- */
return allocHashTable_((HashFunction *)hashStr,
(CompareFunction *)compareStr);
}
return allocHashTable_((HashFunction *)hashStr,
(CompareFunction *)compareStr);
}