Fixed undefined std::min in Memory.