Boost logo

Boost :

Subject: Re: [boost] request for interest in a garbage collection library
From: Kasra (kasra_n500_at_[hidden])
Date: 2009-04-23 09:33:25

>One of the advertised advantages was that is was written purely in
>standard C++, which isn't the case of Boehm which isn't portable.

I am sure Boehm supports so many platforms and many compilers.
Even so, an interpretation from C to ISO C++ is enough for that problem.

>> auto_ptr<char*> traced_buffer(new (gc_traced) char[1024]);
> This raises undefined behaviour, I believe.

gc allocated memory slab is always zero, so there would be no
live pointers on the traced_buffer memory slab.

I think we the concept of the GC should encapsulate two things separately.
memory allocation/deallocation
object construction/destruction


class foo; {
  auto_ptr< foo > foo_bar(new (gc) foo());
} // call foo_bar->~foo();


the RAII call the destructor but the memory that was occupied is not
necessarily free.

the gc::collect(), collects the memory as well as calling the destructor
for non-destructed objects.

-- Kasra


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