|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-08-26 08:16:05
Andreas Huber wrote:
>
> I know, I just mentioned this because Peter seems to suggest that the
> need for memory management customization is rare if the compiler
> folks did their job right.
But it is. Compiler folks not doing their job is the primary motivation for
custom memory management. The C++ community has been trained to take for
granted that it's perfectly acceptable for the system allocator to not work
well. It does not _have_ to be this way. If you can write a better
allocator, so can they.
Of course things aren't that simple since the general allocator can not
afford the luxury to only handle one particular application's memory use
pattern. On the other hand, per-project allocators are usually written under
pressure, not tested well, have bugs, so the playing field is fairly even.
:-) Many project specific allocators I have seen can't even match dlmalloc,
let alone a native commercial replacement.
> However, for a certain class of systems one almost never can avoid
> customization, no matter how ingenious the platform is.
This may well be true, but I'm not convinced that platform-specific
customizations (an implementation detail) absolutely need to be supported by
a portable mechanism affecting the interface.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk