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

Re: [Xen-devel] [PATCH 22/28] libxl: ocaml: event management



On Tue, 2013-04-23 at 17:30 +0100, Rob Hoes wrote:
> > > Good point. The original value may go out of scope in the OCaml
> > > program and will then be GC'ed. We should copy the value to avoid
> > > trouble. To do that, though, we need to know the type of the thing,
> > > which is currently polymorphic. I'll just go ahead and make it a
> > > string instead, because that seems to be the most useful.
> > 
> > Is there not a way to take a GC reference on a value or to otherwise make it
> > possible for the GC to know you've kept hold of it?
> 
> You can keep the value alive in the "main" function or toplevel.

I meant can the C bindings not take a reference to record their taking
of the value and stashing it somewhere?

> > The bigger issue is the const which actually stops you freeing it, without a
> > horrible cast.
> > <1365684384.8036.104.camel@xxxxxxxxxxxxxxxxxxxxxx> has more details on
> > that one.
> 
> Interesting... But I guess there is no other option than use the cast at the 
> moment?

Right.

Ian.


_______________________________________________
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®.