Boost logo

Boost Users :

From: Pfligersdorffer, Christian (Christian.Pfligersdorffer_at_[hidden])
Date: 2008-06-23 02:57:24


Hello Stuart, hello Robert,

since a while I am using a specialised version of
boost::archive::details::heap_allocator<> for deserialization of my
objects. The reason I do this is preformance: I have a bunch of small
objects that I read in one by one, use it and discard it. The custom
allocator simply tells the serialization library to place it always at
the same address. This works fine using boost 1.33.1.

Regards,

--
Christian Pfligersdorffer
Software Engineering
http://www.eos.info
 
Robert Ramey on Sunday, June 22, 2008 2:37 AM:
> which allocator are we talking about?
> 
> If one use STL containers, the allocators associated with the
> container type are used so if specify particular allocators
> for your own collections, those allocators will be used when
> data is recovered and rebuilt.
> 
> The library uses a couple of STL containers for tracking
> objects and class ids.  The currently would not be
> accessible.  No one has ever asked about this before.  We are
> only now starting to profile serialization performance tests
> so we will know for the first time ever if there is anything
> to be gained in this area.  Its possible that a future
> version might permit one to specify an allocator when the
> archive is instantiated - but for now, usage of the standard
> allocator is built in. 
> 
> Robert Ramey
> 
> Stuart Reynolds wrote:
>> I'm interested in using Boost's serialization for a middleware
>> library that receives allocators from the application that uses it.
>> Is it possible to specify which allocators for the serialization
>> library to uses? 
>> 
>> I can't override global new/delete -- the application reserves the
>> right to do this. 
>> 
>> Cheers,
>> - Stuart
> 
> 
> 
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- 
Christian Pfligersdorffer
Software Engineering
http://www.eos.info

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net