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

        C++ Booster (
          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
> > other direction and do pool allocation of the count, rather than making
> > 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
> 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: Unsubscribe:
> Your use of Yahoo! Groups is subject to

Boost list run by bdawes at, gregod at, cpdaniel at, john at