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

Re: [Xen-devel] [PATCH] libxl: Add a gc to libxl_cpumap_alloc, ..._to_hex_string



On Thu, Jun 28, 2012 at 6:17 PM, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> wrote:
> This need to be slotted into my save/restore series, since a new case
> of libxl__*alloc(0,...) was just added.
>
> Thanks,
> Ian.
>
> From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> Subject: [PATCH] libxl: Add a gc to libxl_cpumap_alloc, ..._to_hex_string
>
> In the next patch we are going to change the definition of NOGC to
> require a local variable libxl__gc *gc. ÂAnd this means that passing 0
> to libxl__calloc is going to be wrong.
>
> libxl_cpumap_alloc doesn't have a gc but passes 0 to libxl_calloc
> Fix this by:
> Â- introducing an `out' label and an rc variable
> Â- replacing the returns with Ârc = ERROR_BLAH; goto out;
> Â- adding uses of GC_INIT and GC_FREE.
> Â- changing NULL to NOGC in the call to libxl__calloc
>
> Likewise fix libxl_cpumap_to_hex_string by:
> Â- adding a libxl_ctx* parameter and updating the one call site
> Â- adding uses of GC_INIT and GC_FREE.
> Â- changing NULL to NOGC in the call to libxl__zalloc
>
> Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

Acked-by: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>

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