[vlc-devel] [PATCH 1/1] block: use PAGE_SIZE to determine when to do malloc+memcpy

Ilkka Ollakka ileoo at videolan.org
Sat Oct 4 11:52:48 CEST 2014


On Sat, Oct 04, 2014 at 12:07:01PM +0300, Rémi Denis-Courmont wrote:
> Le samedi 4 octobre 2014, 11:44:57 Ilkka Ollakka a écrit :
> > +    /* Maximum size of reserved footer before shrinking with realloc().
> > +     * FIXME: this is basicly limit where is
> > +     * meaningfull to do malloc/memcpy vs wasted memory size, so
> > +     * is PAGE_SIZE good limit or should it be n*PAGE_SIZE where n > 1?

> "This is basically the threshold from which malloc()/memcpy() actually saves 
> memory." ?

Ah yes, I'll change that wording. Should here be consireded also that is
it worth spending time for malloc and memcpy to just save 1 page?

-- 
Ilkka Ollakka
* joeyh cvs commits his home directory. Aaaaaa
<drow> eeeeeeek
<drow> joeyh: That is simply evil.  Period.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20141004/35af317a/attachment.sig>


More information about the vlc-devel mailing list