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

Re: [Xen-devel] [PATCH V2 1/2] libxl: Have flexarray using the GC



On Thu, Oct 4, 2012 at 6:31 PM, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> wrote:
>
>> +static int gc_is_real(const libxl__gc *gc)
>> +{
>> +    return gc->alloc_maxsize >= 0;
>> +}
>
> You have cloned-and-hacked this from libxl_internal.c !  Instead,
> either declare it in libxl_internal.h, or move it there and make it
> "static inline".

OK, I'll "static inline" it.

>> @@ -104,7 +115,8 @@ void **flexarray_contents(flexarray_t *array)
>>  {
>>      void **data;
>>      data = array->data;
>> -    free(array);
>> +    if (!gc_is_real(array->gc))
>> +        free(array);
>>      return data;
>
> What an odd function.  However, your patch to it seems right to me.

It was maybe a workaround the missing ability to be GC'ed of flexarray.

Thanks,

-- 
Anthony PERARD

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