Re: [boost] smart_ptr: sp_collector can't handle STL containers ofshared_ptr's

2003-05-30 Thread Gregory Colvin
On Thursday, May 29, 2003, at 08:45 America/Denver, Chuck Messenger wrote: ... And so, sp_collector suffers the same problem as shared_cyclic_ptr, and requires the same remedy: that is, it is necessary to be able to tag a container as being one which might hold internal shared_ptr's. Any

Re: [boost] smart_ptr: sp_collector can't handle STL containers ofshared_ptr's

2003-05-30 Thread Gregory Colvin
On Thursday, May 29, 2003, at 09:57 America/Denver, Larry Evans wrote: Gregory Colvin wrote: [snip] It seems that rather than take the route of modifying all the standard containers one might as well just provide a special operator new(gc) and gc_allocator that can track all the memory blocks on

Re: [boost] smart_ptr: sp_collector can't handle STL containers ofshared_ptr's

2003-05-30 Thread Gregory Colvin
Check out http://www.hpl.hp.com/personal/Hans_Boehm/gc/gcinterface.html which provides a gc_alloc, and for new(gc) all you need is something like this: struct gc_t {}; static const gc_t gc; void* operator new (size_t n, const gc_t) { return GC_malloc(n); } void* operator

Re: [boost] smart_ptr: sp_collector can't handle STL containers ofshared_ptr's

2003-05-30 Thread Gregory Colvin
Also check out http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc_cpph.txt for a gc base clase to inherit from. On Thursday, May 29, 2003, at 20:20 America/Denver, Gregory Colvin wrote: Check out http://www.hpl.hp.com/personal/Hans_Boehm/gc/gcinterface.html which provides a

Re: [boost] smart_ptr: sp_collector can't handle STL containers ofshared_ptr's

2003-05-30 Thread Gregory Colvin
On Thursday, May 29, 2003, at 20:52 America/Denver, Larry Evans wrote: Gregory Colvin wrote: Check out http://www.hpl.hp.com/personal/Hans_Boehm/gc/gcinterface.html [snip] On Thursday, May 29, 2003, at 19:57 America/Denver, Larry Evans wrote: Gregory Colvin wrote: [snip] It is not that hard

Re: [boost] smart_ptr: sp_collector can't handle STL containers ofshared_ptr's

2003-05-30 Thread Gregory Colvin
On Thursday, May 29, 2003, at 21:25 America/Denver, Larry Evans wrote: Gregory Colvin wrote: [snip] Do you really need a precise collector? Boehm's collector works just fine. Most people don't, but some do. In Jones and Lins _Garbage Collection_ there's mention of misidentification or false