Custom Allocator

Discussion in 'C++' started by Giovanni, Aug 2, 2006.

  1. Giovanni

    Giovanni Guest

    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...
    Giovanni, Aug 2, 2006
    #1
    1. Advertising

  2. Giovanni

    benben Guest

    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
    benben, Aug 2, 2006
    #2
    1. Advertising

  3. 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.
    Thorsten Kiefer, Aug 2, 2006
    #3
  4. Giovanni

    mlimber Guest

    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
    mlimber, Aug 2, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Genisio
    Replies:
    12
    Views:
    7,961
    tom_usenet
    Jan 15, 2004
  2. Alex Vinokur
    Replies:
    16
    Views:
    12,265
    Alex Vinokur
    Aug 16, 2004
  3. Romeo Colacitti

    Custom memory allocator - alignment

    Romeo Colacitti, Mar 4, 2005, in forum: C Programming
    Replies:
    4
    Views:
    742
    Chris Torek
    Mar 7, 2005
  4. Robert Frunzke

    custom allocator using templates

    Robert Frunzke, Jan 29, 2006, in forum: C++
    Replies:
    4
    Views:
    443
    Robert Frunzke
    Jan 29, 2006
  5. Alex Vinokur
    Replies:
    3
    Views:
    454
    Kai-Uwe Bux
    Apr 1, 2006
Loading...

Share This Page