[vlc-devel] [PATCH] Remove VLC_MALLOC attribute on vlc_custom_create()

Romain Vimont rom1v at videolabs.io
Sun Apr 22 23:33:53 CEST 2018


On Sun, Apr 22, 2018 at 08:16:49PM +0200, Rémi Denis-Courmont wrote:
> Le 22 avril 2018 16:57:26 GMT+02:00, Romain Vimont <rom1v at videolabs.io> a écrit :
> >What do you think about removing all VLC_MALLOC attributes? After a
> >quick search, it seems to me that except xmalloc() (which is deprecated
> >and does not even declare the VLC_MALLOC attribute), there are no
> >malloc-like functions.
> 
> I don't share your analysis. There are plenty of functions returning "new" memory without any pointers.

OK, I probably interpreted the meaning of "malloc-like" too
restrictively.

But even if we keep the malloc attribute only for functions where it
makes sense, it seems to me that its assumptions could be easily broken
in the future without noticing, and I'm not sure about the benefits.


More information about the vlc-devel mailing list