[vlc-devel] commit: aout_BufferAlloc() : remove stack allocation ( Rafaël Carré )

git version control git at videolan.org
Thu Sep 3 15:07:04 CEST 2009


vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Thu Sep  3 15:03:07 2009 +0200| [f76500382dc059091e0d811ed55a22337d2fe04f] | committer: Rafaël Carré 

aout_BufferAlloc() : remove stack allocation

alloca() was not used anyway on OSX and BSD, due to smaller stack sizes,
and we can't assume a default stack size anyway

I expect the performance loss to be minimal, but worth the code
simplification anyway (i didn't benchmark)

aout_BufferAlloc() is moved into its own function in a .c file instead
of being a macro

Since there is now 2 types of allocations (HEAP and NONE), make
i_alloc_type a boolean (true = HEAP alloc, false = NO alloc)

make aout_BufferFree() a static inline function in the same process.
Prototype doesn't change since the provided buffer doesn't need to be
set to NULL (I checked all the callers)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f76500382dc059091e0d811ed55a22337d2fe04f
---

 include/vlc_aout.h               |   19 +++++--------
 modules/audio_mixer/spdif.c      |    2 +-
 src/audio_output/aout_internal.h |   54 +------------------------------------
 src/audio_output/common.c        |   40 ++++++++++++++++++++++++++++
 src/audio_output/dec.c           |    4 +-
 src/audio_output/filters.c       |    8 ++---
 src/audio_output/input.c         |    6 ++--
 src/audio_output/mixer.c         |    4 +-
 src/audio_output/output.c        |    2 +-
 9 files changed, 61 insertions(+), 78 deletions(-)

Diff:   http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=f76500382dc059091e0d811ed55a22337d2fe04f



More information about the vlc-devel mailing list