Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-10-18 19:26:55


I once posted a simple pool allocator for counts based on a deque of:

  union count { std::size_t n; count* next_free; };

It worked great and didn't pull in lots of other dependencies.

===================================================
  David Abrahams, C++ library designer for hire
 resume: http://users.rcn.com/abrahams/resume.html

        C++ Booster (http://www.boost.org)
          email: david.abrahams_at_[hidden]
===================================================

----- Original Message -----
From: "Darin Adler" <darin_at_[hidden]>
To: "Boost" <boost_at_[hidden]>
Sent: Thursday, October 18, 2001 1:12 PM
Subject: Re: [boost] smart_ptr changes

> on 10/18/01 10:07 AM, Darin Adler at darin_at_[hidden] wrote:
>
> > k) use of shared_count for implementation -- I don't see any publicly
> > exported features in the current version; I think we might want to go
the
> > other direction and do pool allocation of the count, rather than making
the
> > reference count object even bigger
>
> I must admit that if we don't plan to do pool allocation for the reference
> count, the the bigger shared_count object is virtually free, since a block
> containing single long typically consumes about the same amount of memory
as
> a block containing a long and three pointers.
>
> But I don't like adding the additional layer unless it pays off either by
> significantly reducing cut and pasted code between shared_array and
> shared_ptr or providing additional features.
>
> -- Darin
>
>
> Info: http://www.boost.org Unsubscribe:
<mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk