[FFmpeg-devel] size=0, but av_malloc(1)

Clément Bœsch u at pkh.me
Wed Mar 23 13:28:11 CET 2016


On Wed, Mar 23, 2016 at 12:25:07PM +0000, Carl Eugen Hoyos wrote:
> Chris Cunningham <chcunningham <at> chromium.org> writes:
> 
> > I'm seeing an interesting pattern [0][1] where we allocate 1 byte in places
> > where I would expect no allocation to be necessary. Why is this being done?
> > 
> > [0] https://github.com/FFmpeg/FFmpeg/blob/master/libavutil/mem.c#L136
> 
> Iirc, alloc(0) crashes (or crashed) on osx.
> 

Wasn't it the free(posix_memalign(0)) because the pointer was invalid or
something? 

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160323/6cc86e0f/attachment.sig>


More information about the ffmpeg-devel mailing list