Custom Allocator

G

Giovanni

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...
 
B

benben

Giovanni said:
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
 
T

Thorsten Kiefer

Giovanni said:
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.
 
M

mlimber

Giovanni said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top