
Larry Evans wrote:
On 09/17/07 03:30, Achilleas Margaritis wrote:
Larry Evans wrote:
On 09/16/07 16:56, Achilleas Margaritis wrote:
Dear boost developers,
You can find a new version of my portable precise C++ garbage collector in vault/memory. [snip] Is any one interested? How does this collector determine the location of pointers on the stack and within the heap? An internal bit map is used as a pointer database. Each bit represents one pointer location in memory.
When the class gc_ptr<T> is created, the bit that corresponds to the pointer's address is set.
What about gc_ptr<T*>? IOW, what if the pointer is actually a pointer to a c array of T or a std::vector<T> or a pointer to std::list<T>.
OOPS. Just read the cppgc.txt which says:
4) manage arrays of objects
However, I'm still wondering if it cppgc can handle gc_ptr<std::vector<T> > or pointer to any other std container. Do you have tests for these cases?
It's very easy to make an STL allocator for gc: the allocator's pointer type will be gc_ptr<T>. The following will be possible: gc_ptr<std::vector<gc_ptr<Foo> > foos = gc_new std::vector<gc_ptr<Foo> , gc_allocator<T> >;
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost