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

Rafaël Carré rafael.carre at gmail.com
Thu Sep 3 16:56:56 CEST 2009


On Thu, 3 Sep 2009 17:49:35 +0300
"Rémi Denis-Courmont" <remi at remlab.net> wrote:

> Le jeudi 3 septembre 2009 16:07:04 git version control, vous avez
> écrit :
> > 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)
> 
> And I don't. The heap is contended and slow. The stack is
> thread-local and has zero allocation overhead.

This is true but:

- Not all filters could use stack allocation (this is why i mentioned
  my expectation of minimal loss)

- We had no overflow checking anyway (it was disabled on OSX & BSD
because of lower stack size than linux it seems)

- Less code = better

-- 
Rafaël Carré
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090903/d3bdd530/attachment.sig>


More information about the vlc-devel mailing list