[Patch] Convert pool_allocator

Dhruv Matani dhruvbird@gmx.net
Mon Mar 22 10:30:00 GMT 2004


On Mon, 2004-03-22 at 15:13, Paolo Carlini wrote:
> Dhruv Matani wrote:
> 
> >I have a few things to say:
> >
> >1. This allocator maintains a per-type pool as opposed to a global only
> >one pool for all types scheme, which I suspect was the original
> >intention.
> >  
> >
> Right. Doesn't seem a bad idea, anyway...
> 
> >2. The check in the allocate function for __n could be removed, because
> >the standard does not say anything, so we may assume undefined behaviour
> >if __n is 0.
> >  
> >
> Let's keep it, was already there and makes allocate and deallocate more 
> consistent.
> 
> >3. There is a line:
> >if (__builtin_expect(__ret == 0, 0))
> >__throw_bad_alloc();
> >  
> >
> Same, was already there. Let's keep the old behavior for now.

Ok.

Then, just ignore the other message I have sent, because it contains
something similar.


-- 
	-Dhruv Matani.
http://www.geocities.com/dhruvbird/

Proud to be a Vegetarian.
http://www.vegetarianstarterkit.com/
http://www.vegkids.com/vegkids/index.html



More information about the Libstdc++ mailing list