I guess this should be:
uint64_t memory = std::numeric_limits<size_t>::max ();