Skip to content

Instantly share code, notes, and snippets.

@Wildhammer
Wildhammer / hash.c
Last active February 13, 2016 06:53 — forked from tonious/hash.c
A quick hashtable implementation in c.
#define _XOPEN_SOURCE 500 /* Enable certain library functions (strdup) on linux. See feature_test_macros(7) */
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include <string.h>
#define INITIAL_HASH_SIZE 4
#define MAX_LOAD_FACTOR 2
#define SCALE_FACTOR 2