Dynamic arrays in c

05 Mar 2014

This page attempts to gather information about various data structures used for storing dynamic content in c.

Simple dynamic arrays

A simple implementation here. It usses realloc() to change the size of the array, that may become slow. Also note this StackOverflow answer about the strategy to use when resizing. Since elements are continous in memory may be fast when accessing content sequentially.


An obstack is a pool of memory containing a stack of objects. You can create any number of separate obstacks, and then allocate objects in specified obstacks. Within each obstack, the last object allocated must always be the first one freed, but distinct obstacks are independent of each other.

Judy arrays

Repositories on Github - - - - - build system cleaned - Markdown - This is a modified JudySL implementation, so that keys are not NUL-terminated C strings, but fixed-length sequence of bytes. Except this, it is the same as original JudySL implementation. -


Project page; written by Karl Malbrain.

A HAT tree consists of a cascaded series of root radix director nodes for leading key bytes, which then point to either another radix node, or a hash bucket, or a string array which contains the rest of the bytes in the keys


Implement Lehman and Yao's high concurrency B-Tree in C language with Jaluta's balanced B-link tree operations including a locking enhancement for increased concurrency.

Other things

discovered while researching this:

Tagged with survey

"Any sufficiently advanced troll is indistinguishable from a genuine kook." Alan Morgan