My own implementation of malloc, realloc, and free