[FFmpeg-devel] [PATCH 1/3] avutil: add staticpool

wm4 nfxjfg at googlemail.com
Sun Jan 21 14:11:27 EET 2018


On Sun, 21 Jan 2018 10:24:21 +0700
Muhammad Faiz <mfcc64 at gmail.com> wrote:

> >                                          I don't trust the atomics use
> > either, I'm don't want to have to debug that ever.  
> 
> Of course, using atomics is more complicated that using mutex (with
> benefits that it will be faster when properly used).
> But it is not a valid reason to avoid using atomic because it is more
> complicated.

Sure, but it also means it should be really be confined to cases where
it _really_ helps with performance.

Where is this a bottleneck at all?

I also think that this really belongs into a malloc implementation
instead. You might also want to try "alternative" malloc
implementations like jemalloc.

Another bad point is that this will make interaction with memory
debuggers worse. (They can't track whether the memory is considered
allocated or free.)


More information about the ffmpeg-devel mailing list