+#define ston_dht_size(_HT) (ston_ht_size(_HT))
+#define ston_dht_rows(_HT) (ston_ht_rows(_HT))
+#define ston_dht_cols(_HT) (ston_ht_cols(_HT))
+#define ston_dht_keyrow(_HT,_KEY) (ston_ht_keyrow(_HT,_KEY))
+#define ston_dht_pagestart(_HT) ((void**)(((uint8_t*)(_HT)) + STON_DHT_HEADERSIZE))
+#define ston_dht_pagehead(_HT) ((_HT)->page_head)
+#define ston_dht_pagemax(_HT) ((void**)((uint8_t*)(_HT) + STON_DHT_SIZE - sizeof(void**)))
+#define ston_dht_start(_HT,_DEPTH) ((uint8_t*)*(ston_dht_pagestart(_HT) + _DEPTH))
+#define ston_dht32_start(_HT,_DEPTH) ((uint32_t*)ston_dht_start(_HT,_DEPTH))
+#define ston_dht32_end(_HT,_DEPTH) (ston_ht32_start(_HT,_DEPTH) + ston_ht_size(_HT))
+#define ston_dht32_size(_HT) (ston_dht_size(_HT) * sizeof(uint32_t))
+#define ston_dht32_pagepush(_HT) ((*(++((_HT)->page_head)) = (_HT)->ht_alloc(ston_dht32_size(_HT))))
+#define ston_dht32_pagepop(_HT) ((_HT)->ht_free((_HT)->page_head--))
+
+/* Creates a new bucketted hash table, provided a memory allocation function
+ that takes a single size_t bytes, a memory free function, a column count, and
+ a row count which determines the size of the buckets.
+*/
+STON_FUNC
+ston_dht ston_dht32_create
+( uint16_t ht_columns,
+ size_t ht_rows,
+ uint8_t ht_flags,
+ void* (*ht_alloc)(size_t),
+ void (*ht_free)(void*)
+)
+{ size_t ht_size = ht_rows * ht_columns * sizeof(uint32_t);
+ ston_dht ht = (ston_dht) ht_alloc(STON_DHT_SIZE);
+ if (ht != NULL)
+ { for (ht->ht_2pow = 0; ht_size; ht->ht_2pow++)
+ ht_size = ht_size >> 1;
+ ht->ht_columns = ht_columns;
+ ht->ht_flags = ht_flags;
+ ht->ht_alloc = ht_alloc;
+ ht->ht_free = ht_free;
+ ht->page_head = ston_dht_pagestart(ht);
+ if ((*(ht->page_head) = ht->ht_alloc(ston_dht_size(ht))) == NULL)
+ ht_free(ht);
+ }
+ return ht;
+}