This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]