This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: vector<> can probably never grow to it's maximum size!
Paolo Carlini wrote:
Therefore, mt_alloc either issues to the OS a *very* small memory
request - to
refill one of its pools, of order 4K - or just returns what ::operator
new returns.
In low memory, only the latter requests are problematic,
Forgot to add: even supposing that we want to deal gracefully with these
::operator new throws (pool_allocator is able to do that), in such
cases, vector
is actually requesting only an handful of bytes, typically cannot really
keep on
working if allocator::allocate returns less. This is *not* the situation
that you
presented at the outset, in any case.
Paolo.