I am trying to push_back instances of an object to a vector (e.g. A a; vectorA.push_back(a)) but the code crashes whenever I try to push_back more once the size of the vector is more than 16777216 (16*1024*1024) (the capacity of the vector is 16777216 as well, this means vector will reallocate memory).
Anyone knows how I should deal with the issue? I checked the memory used is about 320MB.