"Larry Evans" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Philippe A. Bouchard wrote: > > [snip] > > > > I guess it would also be possible to allocate a "shifted object" into some > > specific memory page, so operator delete will be able to quickly detect > > weither the object is shifted or not. This way it would be possible to > > overload the main operator new. > > > > I think this is what BW does to distinguish between pointers produced by > GC_malloc_uncollectable and gc_malloc. Also, I think cmm does something > similar (see ftp://ftp.di.unipi.it/pub/Papers/attardi/SPE.ps.gz ).
Yeah, this is exactly how it works. It can create different heaps and the pointer can be identified quickly to which heap it belongs. Their example uses placement operator new also. In fact, if you want to share any pointer generated by any placement new between any smart pointer, this would be the best way IMO. Some BOOST_DISPLACE_NEW_GC macro could be defined to displace the main operator new also. Philippe A. Bouchard _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost