[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/2] libxl: Have flexarray using the GC
Anthony PERARD writes ("Re: [Xen-devel] [PATCH 2/2] libxl: Have flexarray using the GC"): > On 09/28/2012 06:27 PM, Ian Jackson wrote: > > If gc is NOGC then this does the wrong thing. Callers should be able > > to specify NOGC for a flexarray which they want to survive across > > multiple calls into libxl. > > I'm not sure I see your point here. If a something needs a NOGC'ed > flexarray, then flexarray_make(NOGC, x, x) will give this. So then you put the flexarray in some long-term data structure, which survives the call to libxl and therefore the gc. Is it safe for NOGC's gc*, derived from the now-destroyed actual gc, to be embedded in the flexarray and reused later in a different libxl call with a different gc (but the same ctx) ? > > For this all to work correctly, including error handling, I think > > flexarray_grow and its callers need to take a gc from the context. It > > would be wise to assert that the either 1. both the gc passed to make > > and grow are NOGC or 2. they are the same. > > All right, I'll add gc to _grow and it's caller. And will assert on both > condition. Feel free instead to explain to me why I'm wrong :-). Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |