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

Re: [Xen-devel] [PATCH 3/4] libxl: add version_info function [and 1 more messages]



Vincent Hanquez writes ("Re: [Xen-devel] [PATCH 3/4] libxl: add version_info 
function [and 1 more messages]"):
> On 19/04/10 16:36, Ian Jackson wrote:
> > I don't think that's correct because memory allocated by libxl_sprintf
> > does not survive return from libxl into the caller.
> 
> It survives as long as the context is not ctx_free. i.e. if the data 
> need to preserve longer, they will have do be duplicated before freeing 
> the context.

This is sadly not a really tenable behaviour in the long term because
(a) a long-running caller does not want to free the context (and
necessarily reestablish xenstore connections etc. etc.) (b) the caller
may anyway not be able to free the context if doing so frees data they
are still using.

There are not (if I'm not mistaken) currently any uses of the libxl
allocators for data which persists beyond the current libxl entrypoint
and we shouldn't introduce any now.  If there are any they should be
removed.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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