xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Andre Przywara <andre.przywara@amd.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Keir Fraser <Keir.Fraser@eu.citrix.com>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [PATCH 3/4] libxl: add version_info function [and 1 more messages]
Date: Mon, 19 Apr 2010 17:41:24 +0100	[thread overview]
Message-ID: <4BCC87B4.4010805@eu.citrix.com> (raw)
In-Reply-To: <19404.33570.623809.702106@mariner.uk.xensource.com>

On 19/04/10 17:21, Ian Jackson wrote:
> 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.

This is not perfect, and has a (tiny) cost, but it makes writing the 
current ocaml bindings (and the future python bindings) much easier and 
much less memory leak prone.

Limiting the number of possible boxes of error type, will definitely 
help getting XCP ported on libxl.

-- 
Vincent

  reply	other threads:[~2010-04-19 16:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-18 21:17 [PATCH 0/4] Add "xl info" command Andre Przywara
2010-04-18 21:23 ` [PATCH 1/4] libxl: extend physinfo structure Andre Przywara
2010-04-19  7:50   ` Vincent Hanquez
2010-04-19 15:27     ` [PATCH 1/4] libxl: extend physinfo structure [and 1 more messages] Ian Jackson
2010-04-18 21:25 ` [PATCH 2/4] libxl: add sched_get_id function Andre Przywara
2010-04-19  7:50   ` Vincent Hanquez
2010-04-19 15:29     ` [PATCH 2/4] libxl: add sched_get_id function [and 1 more messages] Ian Jackson
2010-04-18 21:26 ` [PATCH 3/4] libxl: add version_info function Andre Przywara
2010-04-19  8:08   ` Vincent Hanquez
2010-04-19 15:36     ` [PATCH 3/4] libxl: add version_info function [and 1 more messages] Ian Jackson
2010-04-19 16:07       ` Vincent Hanquez
2010-04-19 16:21         ` Ian Jackson
2010-04-19 16:41           ` Vincent Hanquez [this message]
2010-04-19 20:43       ` Andre Przywara
2010-04-20  8:36         ` Vincent Hanquez
2010-04-21 12:10           ` Andre Przywara
2010-04-21 12:53             ` Vincent Hanquez
2010-04-18 21:28 ` [PATCH 4/4] xl: add "xl info" command Andre Przywara
2010-04-19 15:38   ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BCC87B4.4010805@eu.citrix.com \
    --to=vincent.hanquez@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=Keir.Fraser@eu.citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=andre.przywara@amd.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).