c heap

stumble upon.

http://www.cprogramming.com/tutorial/computersciencetheory/heap.html

Pretty nice doc, blender has a heap implementation but I must admit I never used it, perhaps I should have. just never ran into problems that needed it to resolve.

see: source/blender/blenlib/intern/BLI_heap.c