[vlc-devel] [PATCH] access: dvb: Realloc block to actually used size.
typx at dinauz.org
Tue Sep 24 09:43:05 CEST 2013
Le lundi 23 septembre 2013 à 04:50:51, Julian Scheel a écrit :
> So actually as of now there will be a realloc in almost every read
> procedure, which indeed sounds a bit costly. Still a shrinking
> realloc, assuming that the realloc implementation is a good one,
> would only free the left-over memory, which again is not too costly.
> So what would you guys say? Reduce the BUFSIZE to something like 5
> packets and never Realloc, which will still waste some memory, but
> less? Make BUFSIZE dynamically changing to previous read-size + 1?
> Or some more sophisticated shaping algorithm?
> Or just take the reallocs and assume that the implementations will
> perform well?
Alternatively, is it possible to call the dvb_read function several
times to fill the buffer in one Read occurence?
In any case, if I'm the only one frowning at the realloc thing, then
it's good enough :)
Denis Charmet - TypX
Le mauvais esprit est un art de vivre
More information about the vlc-devel