paurkedal/bdwgc — comment on commit 9d07ead2d0bc217a3ded434372952f7a8db6c17a
File:  line 0
By ivmai:

Hi Petter,

13 01 2012, 22:54 Petter Urkedal :
> Hi Ivan,
>
> On 2012-01-13, Ivan Maidanski wrote:
> > The latter seems to me not logically correct as the object is marked (somehow - it is implementation-dependent).
>
> My take on it is that GC_set_mark_bit and GC_clear_mark_bit does not
> change the object as seen from the users. Rather they change the
> collectors idea about its reachability, which is dependent on an
> external link to the object, rather than the content of the object. The
> way I use it myself, objects are never changed once constructed, except
> possibly for an internal next-link.

Hmm... Looks reasonable, thank you for the explanation. I agree with you now.

Regards.

>
> > I've committed this patch (adding const to GC_is_marked).
>
> Thanks, I don't mind the others being non-const. I only call this from
> low-level allocation and clean-up code, which already contain uintmax_t
> to void * casts.
>
> Petter
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/paurkedal/bdwgc/commit/9d07ead2d0bc217a3ded434372952f7a8db6c17a#commitcomment-865805
>