Boost logo

Boost :

From: Greg Colvin (Gregory.Colvin_at_[hidden])
Date: 2002-09-07 10:09:59


At 08:45 AM 9/7/2002, Larry Evans wrote:
>Greg Colvin wrote:
>
>>It's been my intent to create a version of cyclic_ptr that
>>would be compatible with intrusive_ptr and shared_ptr, but
>>I haven't had time or motivation. The weak_ptr companion to
>I've been working on the something similar. I also realized that
>the method of garbage collection and method of internal pointer
>enumeration were independent. The two garbage collection methods
>I'm working on are your's and the local mark scan of Lin's.

Tell me more about how you are using Lin's method.

>I've got
>an enumeration:
> enum
>gc_methods
> { gc_local_mark_scan
> //^ Lins's method
> , gc_global_mark_scan
> //^ Christopher's(or Colvin's) method
> };
>
>to select which one in a specialized class. I've got another enumeration
>to specify the method of enumerating the internal pointers:
>
> enum
>ip_methods
> { ip_offset_iterator
> //^ this method has the proxies record their offsets in
> // their containing subject. Also, containers(e.g. vector)
> // of proxies record their offsets from their containing subject
> // as well as a function to iterate over the contained
> // proxies (e.g. something based on vector::iterator ).
> //
> // This method off accessing internal pointers is based
> // on:
> // David L. Detlefs
> // "Garbage collection and runtime typing as a C++ library"
> // _USENIX C++ Conference_, Portland, Oregon
> // August 1992
> // USENIX Association
> //
> // However, in addition to Detlef's method, this method also
> // is able to access pointers within containers, such as
> // vector<prox_type> or list<prox_type> by using template,
> // scoped_cyclic_container.
> , ip_assign_op_switch
> //^ this method uses subject::operatr= with self as arg to cause
> // all proxies (i.e. internal pointer) within the subject
> // to call their operator= via the virtual children method. // This proxy::operator= then calls the static parent method.
> // This is Greg Colvin's method.
> };
>I've got a driver working with gc_local_mark_scan and ip_offset_iterator.
>I'm still working on the others.
>
>You're review and comments would be useful. Should we work on it
>in the sandbox or should I just upload the still incomplete code to
>files?

Whatever works for you is fine with me. For now just email me your code.


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