Boost logo

Boost :

From: Larry Evans (jcampbell3_at_[hidden])
Date: 2002-09-07 13:29:10

Larry Evans wrote:

> I was unclear. I wasn't going to use the cmm code to do conservative
> collection.
> I was going go use it to diagnose invalid uses of shared_cyclic_ptr.
> For example,
> if the smart_ptr's are used correctly (for example,
> vector<shared_cyclic_ptr<subj> >
> instead of scoped_cyclic_container<vector,subj,...>) then neither
> ip_assign_op_swith or
> ip_offset_iterator would work. In the first case, because the vector
> would not assign each
> element if phase indicated gc was being done, and in the second case,
> because no offset
> to the containing vector was calculated.

More clearly, the cmm allocator divides the heap into "subheaps". One of
these is the
UnCollectedHeap. This corresponds to the standard new. Another heap,
might be one where referents of shared_cyclic_ptr's are created and
where the vector
in the superclass of scoped_cyclic_container<vector,subj,...>) is created.

Now, let's say the programmer notices the collections are not working as
he expects.
Cmm can diagnose pointers from one heap to another. This is just what
the programmer
needs to find where his errant vector<shared_cyclic_ptr<subj> > is located.

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