We can pass in the existing memory manager instance into the functions instead of using the global accessor to access it.