|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-11-18 08:45:25
Matthew Wilson wrote:
>> 7. shared_ptr, but with #define BOOST_SP_USE_QUICK_ALLOCATOR
>
> Have just tried this. It makes a snall difference. However, my
> makefile and test cases are growing exponentially. Hence I'd like to
> know what the quick allocator does, and whether it would be something
> that would be seriously considered in a development system.
>
> I'm guessing it's the D&E style
> allocate-from-big-block-and-delete-does-nothing thing. If so, then
> one would not use it in processes that have non-trivial lifetimes.
> However, it may not. Please advise.
Yes, that's what quick_allocator does. It is mainly useful when the
underlying malloc isn't well suited for small allocations, as is sometimes
the case on Windows. The lifetime of the process does not matter as long as
it doesn't allocate unbounded amounts of memory.
Benchmarking with quick_allocator is typically used as a quick check to find
out whether the test results are skewed by the underlying malloc.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk