views:

246

answers:

1

I need to use Loki's small object allocator but I am very confused as to how it works. I've read the documentation and lots of forums but it doesnt make sense: some of them say to use the stl, others use custom allocators. I just need to be able to test its performance with allocating and deallocating objects of different sizes. Could someone please provide a small example of how to use it?

A: 

Ok, best I got was to make Loki's Small Object Allocator compliant with the STL. To do this I just created a wrapper class for the SmallObjAllocator class in Loki according to http://www.codeproject.com/kb/cpp/allocator.aspx?fid=16541&df=90&mpp=25&sort=Position&tid=1677312

Gregory