A custom malloc implementation using the next-fit allocation algorithm