fix a small bug in MemoryPool.cpp