5 ms·
That would depend on what allocator your instance of std::vector is using, and if it is not using one then ultimately on the behavior of your program's global n
by jeffbee 5y ago
That would depend on what allocator your instance of std::vector is using, and if it is not using one then ultimately on the behavior of your program's global new, and finally in the absence of that the behavior of your platform's malloc. It's possible that on your platform, malloc already has this behavior (lazily realizing pages when first accessed).