[m-rev.] for post-commit review: clarify description of Boehm

Zoltan Somogyi zoltan.somogyi at runbox.com
Mon Sep 2 13:42:50 AEST 2019



On Mon, 2 Sep 2019 12:34:30 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:

> >  Conservative garbage collection makes inter-language calls simplest.
> > -When using conservative garbage collection,
> > -heap storage is reclaimed automatically.
> > -Pointers to dynamically-allocated memory can be passed to and from C
> > -without taking any special precautions.
> > +The conservative garbage collector
> > +has its own set of functions for allocating memory blocks,
> > +such as @samp{MR_GC_NEW}, which are documented in runtime/mercury_memory.h.
> 
> Wrap that last bit in @file.
> 
> > +Memory blocks allocated by these functions,
> > +either in C code generated by the C compiler
> 
> s/C compiler/Mercury compiler/
> 
> > +or in C code hand written by programmers,
> > +are automatically reclaimed when they are no longer referred to
> > +either from the stack or from other memory blocks allocated by these functions.
> 
> Or from global variables.

All done.

> > +Pointers to such memory blocks can be passed to and from C code freely
> > +as long as (a) pointers to these blocks are stored nowhere else,
> 
> What do you mean by point (a)?

I was trying to convey the meaning of this warning from the boehm gc documentation:

WARNING: pointers inside memory allocated by the standard malloc are not seen by the garbage collector.

I have rewritten that paragraph in an effort to clarify this.
Please have a look.

Zoltan.


More information about the reviews mailing list