[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 Jackson writes ("Re: [PATCH v3-RESEND 12/28] libxl: ocaml: make Val_defbool 
GC-proof"):
> Bonus if your explanation refers to sequence points.

Andrew Cooper has helped explain, and Ian Campbell pointed me at
caml/memory.h.

AIUI now: Val_bool and Val_some allocate.  So they may enter the GC
and therefore at that point you're not allowed to have any
ocaml-allocated values (such as the results from Val_bool) which
aren't in the GC root set.  Assigning the return value to the
CAMLlocal variable puts it in the GC root set.

So if that's right, I approve of the patch.

Ian.

(I still think the docs are pretty poor.)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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