From: Anthony PERARD <anthony.perard@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
Xen Devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 2/2] libxl: Have flexarray using the GC
Date: Mon, 1 Oct 2012 15:15:07 +0100 [thread overview]
Message-ID: <5069A56B.4000605@citrix.com> (raw)
In-Reply-To: <20581.56805.294140.556698@mariner.uk.xensource.com>
On 09/28/2012 06:27 PM, Ian Jackson wrote:
> Anthony PERARD writes ("[Xen-devel] [PATCH 2/2] libxl: Have flexarray
using the GC"):
>> This patch makes the flexarray function libxl__gc aware.
> ...
>> -flexarray_t *flexarray_make(int size, int autogrow)
>> +flexarray_t *flexarray_make(libxl__gc *gc, int size, int autogrow)
> ...
>> {
> ...
>> + array->gc = gc;
>
> 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.
> 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.
Thanks,
--
Anthony PERARD
next prev parent reply other threads:[~2012-10-01 14:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-26 13:31 [PATCH 0/2] Cleanup: flexarray taking gc Anthony PERARD
2012-09-26 13:31 ` [PATCH 1/2] libxl_json: Use libxl alloc function Anthony PERARD
2012-09-28 17:22 ` Ian Jackson
2012-10-01 14:04 ` Anthony PERARD
2012-09-26 13:31 ` [PATCH 2/2] libxl: Have flexarray using the GC Anthony PERARD
2012-09-28 17:27 ` Ian Jackson
2012-10-01 14:15 ` Anthony PERARD [this message]
2012-10-01 14:17 ` Ian Jackson
2012-10-01 14:23 ` Anthony PERARD
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=5069A56B.4000605@citrix.com \
--to=anthony.perard@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.