Dynamic memory allocator using segregated lists