using mm_alloc() and mm_free() to replace malloc() and free()