[Mesa-dev] [PATCH 3/3] r600, compute: Plug couple of memory leaks

Marek Olšák maraeo at gmail.com
Fri Jun 5 10:25:29 PDT 2015


On Fri, Jun 5, 2015 at 5:02 PM, Jan Vesely <jan.vesely at rutgers.edu> wrote:
> sorry for the delay, I'm just getting settled.
>
> On Tue, 2015-05-26 at 11:29 +0200, Marek Olšák wrote:
>> The new functions in gallium/radeon shouldn't be inline, because
>> inlining them isn't critical for performance.
>
> should I avoid header definitions entirely, or are static (not inline)
> functions OK?

Header definitions are okay if they are justified.

>
>>
>> Also, I don't see a point in functions that only contain one line.
>> Especially radeon_llvm_dispose_kernel_module looks like an
>> unnecessary wrapper.
>
> I generally use wrappers to achieve symmetric interface. i.e.
> radeon_shader_binary_init
> radeon_shader_binary_clean
> look nicer then using memset in place of the first one.
> Similarly
> radeon_llvm_get_kernel_module
> radeon_llvm_dispose_kernel_module
>
> If that's not desirable, I'll remove the one-liners (binary_init,
> dispose_kernel_modules).

It's just what I would do with very trivial one-liners. If it makes
the code nicer to you, then be it. I don't care much.

Marek


More information about the mesa-dev mailing list