Boost logo

Boost :

From: Gregory Colvin (gregory.colvin_at_[hidden])
Date: 2003-10-06 16:30:18


On Monday, Oct 6, 2003, at 15:15 America/Denver, Philippe A. Bouchard
wrote:
> Gregory Colvin wrote:
>
> [...]
>
>>> There is no graph scanning, everything works instantaneously,
>>> reasonnably fast and:
>>>
>>> - sizeof("indicator") == sizeof(long)
>>> - sizeof(shifted_ptr<T, root_collector>) == sizeof(void *) * 2
>>
>> That is the same size as shared_ptr. So why not put the effort into
>> a garbage collecting allocator for shared_ptr?
>
> It is the same size but it is still twice faster,

How so?

> the memory map is not fragmented,

Explain?

> destructors will be called on time (not obvious)

What does "on time" mean? The best time and order for object
finalization
is an open and contentious issue among memory management experts.

> & it is not requiring too much extra memory. It is a better overall,

Better than what?

> I would like it to be benchmarked

Me too.

My suspicion is that your implementation of garbage collection can be
given a shared_ptr interface with no loss of performance, which I would
prefer over introducing a new type.


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