vector<> can probably never grow to it's maximum size!
Dhruv Matani
dhruvbird@gmx.net
Mon Oct 18 16:20:00 GMT 2004
On Mon, 2004-10-18 at 20:59, Paolo Carlini wrote:
> 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.
Thanks for pointing it out to me that these are 2 separate issues.
>
> Paolo.
--
-Dhruv Matani.
http://www.geocities.com/dhruvbird/
The price of freedom is responsibility, but it's a bargain, because
freedom is priceless. ~ Hugh Downs
More information about the Libstdc++
mailing list