[Mesa-dev] [PATCH 1/4] r600/compute: Don't leak compute pool item_list/unallocated_list
Aaron Watry
awatry at gmail.com
Thu Aug 21 09:35:38 PDT 2014
Yeah, I see that now. I changed my editor settings halfway through
this series. I thought I had cleaned up the indentation outside of my
IDE, but I guess I missed some spots.
With regards to comment-style... I'll change it, but for the record,
I really dislike using C-style comments for single-line comments.
--Aaron
On Thu, Aug 21, 2014 at 11:22 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> On Thu, Aug 21, 2014 at 12:06 PM, Aaron Watry <awatry at gmail.com> wrote:
>> Signed-off-by: Aaron Watry <awatry at gmail.com>
>> ---
>> src/gallium/drivers/r600/compute_memory_pool.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/src/gallium/drivers/r600/compute_memory_pool.c b/src/gallium/drivers/r600/compute_memory_pool.c
>> index 9324b84..55ff7d5 100644
>> --- a/src/gallium/drivers/r600/compute_memory_pool.c
>> +++ b/src/gallium/drivers/r600/compute_memory_pool.c
>> @@ -95,6 +95,10 @@ void compute_memory_pool_delete(struct compute_memory_pool* pool)
>> pool->screen->b.b.resource_destroy((struct pipe_screen *)
>> pool->screen, (struct pipe_resource *)pool->bo);
>> }
>> + //In theory, all of the actual items were already freed in compute_memory_free... Just need to delete the list heads
>> + free(pool->item_list);
>> + free(pool->unallocated_list);
>> + //And then the pool itself
>
> Just some trivia -- you appear to have had a bit of an indentation
> fail on all the radeon patches in this series. Also I believe the
> style is not to use C99 (C++-style) comments in .c files:
>
> src/gallium/drivers/r600 $ git grep '//' | wc -l
> 397
> src/gallium/drivers/r600 $ git grep '/\*' | wc -l
> 1587
>
> (and the // are over-represented since each line gets one)
>
>> free(pool);
>> }
>>
>> --
>> 1.9.1
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list