[FFmpeg-devel] [PATCH] Pure, const and malloc attributes to libavutil

Zuxy Meng zuxy.meng
Wed Mar 19 09:35:37 CET 2008


Hi,

2008/3/18, Michael Niedermayer <michaelni at gmx.at>:
> On Tue, Mar 18, 2008 at 01:09:51PM +0800, Zuxy Meng wrote:
> > Hi,
> >
> > The attached patch adds proper GCC attributes to functions in
> > libavutil, exposing more optimization opportunities to the compiler,
> > especially for a lousy client of that lib.
>
> ok
>
> and besides these you should also add
> attribute(alloc_size) to av_m/realloc()

Done.
>
> and attribute(cold) to all init/uninit functions over lav* :)

Well, there're quite a lot of such functions and I'm not quite sure
whether a function named *init should be considered cold. I'll do this
bit by bit and send out patches for review from time to time.
-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6




More information about the ffmpeg-devel mailing list