Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Custom Allocator (http://www.velocityreviews.com/forums/t455845-custom-allocator.html)

Giovanni 08-01-2006 11:28 PM

Custom Allocator
 
Im trying to create a custom allocator for some stl lists im am using
in a program. I have tried finding resources for it on the internet
but i am unable to find anything that does a better job than just
saying to derive from allocator... Can anybody help...


benben 08-02-2006 01:11 AM

Re: Custom Allocator
 

Giovanni wrote:
> Im trying to create a custom allocator for some stl lists im am using
> in a program. I have tried finding resources for it on the internet
> but i am unable to find anything that does a better job than just
> saying to derive from allocator... Can anybody help...


What sort of allocator do you want to create? Just google around you
may find that the allocator might have already been written and tested.
For example the Boost pool library if my memory serves me right.

Ben


Thorsten Kiefer 08-02-2006 01:54 PM

Re: Custom Allocator
 
Giovanni wrote:

> Im trying to create a custom allocator for some stl lists im am using
> in a program. I have tried finding resources for it on the internet
> but i am unable to find anything that does a better job than just
> saying to derive from allocator... Can anybody help...


Do it like I did and look into the STL source, thare you have an example of
how an allocator is to be implemented.


mlimber 08-02-2006 02:03 PM

Re: Custom Allocator
 
Giovanni wrote:
> Im trying to create a custom allocator for some stl lists im am using
> in a program. I have tried finding resources for it on the internet
> but i am unable to find anything that does a better job than just
> saying to derive from allocator... Can anybody help...


For resources on the internet, use Google. For resources in print, try
section 19.4 of Stroustrup's _The C++ Programming Language_ or chapter
15 of Josuttis's _The C++ Standard Library - A Tutorial and Reference_.

Cheers! --M



All times are GMT. The time now is 08:55 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.