[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3-RESEND 12/28] libxl: ocaml: make Val_defbool GC-proof

Ian Campbell writes ("Re: [PATCH v3-RESEND 12/28] libxl: ocaml: make 
Val_defbool GC-proof"):
> On Mon, 2013-10-21 at 14:32 +0100, Rob Hoes wrote:
> > The Val_* functions potentially allocate new values on the OCaml heap, and 
> > may
> > trigger an iteration of the OCaml GC.  Therefore, it is important to assign
> > values produced by Val_* immediately to variables declared with CAMLlocal
> > macros, which register the values with the GC.
> Bonkers stuff ;-)

Even given this explanation, I still don't understand why the fix is
correct and complete.

What difference do you think it makes whether things are "assigned to
variables" or not ?

Bonus if your explanation refers to sequence points.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.