Simple memory manager for C