Finish the implementation of Memory Pool.