|
Boost : |
From: christopher baus (christopher_at_[hidden])
Date: 2005-12-21 21:47:41
> I'd be interested to know whether you, or others, find this
> custom memory allocation interface satisfactory. After having
> used it I think that I quite like this approach because it
> allows the developer to use application-specific knowledge about
> the number of concurrent asynchronous "chains" when customising
> memory allocation.
>
> This custom memory allocation implementation required no changes
> to the existing asio public interface or overall design.
Chris,
I'm trying to catch up here after hacking on the reactor implementation in
a corner for a few days. Could you point me to a post that describes the
custom memory allocation interface?
One thing I've done is written a pooled_list implementation and
parametrized the list implementation used by your hash_map. This
eliminates a bunch of hits to the global allocator, at the cost of a
pre-allocated fixed hash_map size. Considering that the hash_map
associates FDs with handlers, I think this is a reasonable trade off.
christopher
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk