"Bohdan" <[EMAIL PROTECTED]> wrote > > All boost::pool library is about allocation of small objects > of the same size. I'm just curious how malloc can be > accelerated if it handles different size allocations? > May be boost will also need something like that. > I understand that "char" can be treated as small object, > but i'm not sure if boost::fast_pool_allocator gives any acceleration > in this case. > malloc() cannot be accelerated very much: free() is missing information about allocated memory block size.
new/delete probably won't be accelerated a lot using some pool management - new libraries took car of it already. I did comparison of Alexandrescu's SmallObjAllocator<> versus up-to-date allocators and found them much better. They ( Borland 6.0, Visual C++ 6.0 and Intel 6.0) use pools for small objects and are also _significantly_ faster than even hand tuned C++ code. I assume they are coded in assembler. The only exception I found was Linux GCC 2.94: SmallObjAllocator<> here has better characteristics (both speed/memory). /Pavel _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost