Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hashtable implementation in C [closed]

Tags:

c

hashtable

I am seeking a robust implementation of a hashtable in C. I'm looking for something other than ghashtable in glib.

like image 891
Dervin Thunk Avatar asked Oct 21 '25 14:10

Dervin Thunk


2 Answers

I've heard good things about the GLib Hash Table.

like image 191
R Samuel Klatchko Avatar answered Oct 23 '25 05:10

R Samuel Klatchko


A simple one in libc, see <hsearch.h> and man hsearch.

Update: just found that you can implement hashtable very easily with the help of hlist from Linux kernel. Take a look at <list.h> in Linux kernel source code for hlist_head/node and their operations.

like image 42
W.Sun Avatar answered Oct 23 '25 05:10

W.Sun



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!