How to determine the actual (not theoretical) maximal size of vector in C++ I am confused about some aspects of memory management of C++ (in MacOS).