|
Boost Users : |
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2007-07-27 16:49:22
Most of std classes support custom allocators. basic_stringstream and vector do this as well. You
can preallocate the memory needed and create objects in this memory locations. For more help see
the placement new operator.
But your question here is very general. It is for example possible use some COW implementation of
your objects together with reference counted content. You objects are not duplicated on every
copy, but only when one tries to write to the content. To give you better advices you should
provide more specific examples.
With Kind Regards,
Ovanes
On Fri, July 27, 2007 22:17, Richard wrote:
> Well - I have zero experience here.
>
> I remember that they were frequently advertised in the back of computer mags
> a few years back. Try Google? I saw...
>
> http://www.freedownloadscenter.com/Programming/C_and_C++_Tools_and_Component
> s/SwiftAlloc_Memory_manager_replacement.html
>
> and
>
> http://www.newcodeinc.com/
>
> Another possibility might be to look at how your app uses memory.
>
> If you have vast numbers of objects all the same size you might benefit from
> a home written replacement for operator new. If you special case them all
> into a special pool it might get them out of the way of everything else.
> The general purpose manager that ships with the compiler is just that -
> general! Sounds like you have a specific problem.
>
> HTH,
>
> - Richard
>
> -----Original Message-----
> From: boost-users-bounces_at_[hidden]
> [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Bill Lear
> Sent: 27 July 2007 21:01
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] Stupid ostringstream question
>
> On Friday, July 27, 2007 at 20:47:54 (+0100) Richard writes:
>>Have you tried investing in a replacement memory manager?
>
> Such as?
>
>>It might give you a bigger overall payback than just tinkering with one
>>aspect.
>
> Certainly possible, however, it is also possible that the sheer size
> and number of objects we have in our application makes it inherently
> difficult for dynamically-allocated memory for small objects to work
> very well at very high memory usages. Thus the hope for a hybrid
> static store and ostringstream.
>
>
> Bill
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
With Kind Regards,
Ovanes Markarian
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