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!


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


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