Take the 2-minute tour ×  I am looking for an open source C
implementation of a hash table that keeps all the data in one
memory block, so it can be easily send over a network let say. I
can only find ones that allocate small pieces of memory for
every key-value pair added to it.  Thank you very much in
advance for all the inputs.  EDIT: It doesn't necessarily need
to be a hash table, whatever key-value pair table would probably
do.  share|improve this question add comment  4 Answers  up vote
0 down vote accepted  On a unix system I'd probably utilise a
shared memory buffer (see shm_open()), or if that's not
available a memory-mapped file with the MAP_SHARED flag, see the
OS-specific differences though http://en.wikipedia.org/wiki/Mmap
If both shm_open and mmap aren't available you could still use a
file on the disk (to some extent), you'd have to care about the
proper locking, I'd send an unlock signal to the next process
and maybe the seek of the updated portion of the file, then that
process locks the fil