Dynamic memory allocator with explicit free lists in C