Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Custom Allocator

Reply
Thread Tools

Custom Allocator

 
 
Giovanni
Guest
Posts: n/a
 
      08-01-2006
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...

 
Reply With Quote
 
 
 
 
benben
Guest
Posts: n/a
 
      08-02-2006

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

 
Reply With Quote
 
 
 
 
Thorsten Kiefer
Guest
Posts: n/a
 
      08-02-2006
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.

 
Reply With Quote
 
mlimber
Guest
Posts: n/a
 
      08-02-2006
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Behaviour of custom allocator for vector Alex Vinokur C++ 3 04-01-2006 04:19 PM
custom allocator using templates Robert Frunzke C++ 4 01-29-2006 05:30 PM
Custom memory allocator - alignment Romeo Colacitti C Programming 4 03-07-2005 01:02 AM
Custom allocator sample code for vector Alex Vinokur C++ 16 08-16-2004 11:25 AM
Idea for custom thread-safe STL allocator? Brian Genisio C++ 12 01-15-2004 03:41 PM



Advertisments