A dynamic memory allocation algorithm written in C