[Ffmpeg-devel] [PATCH] Replace av_malloc+memset with av_mallocz
Wed Sep 6 15:58:36 CEST 2006
Op woensdag 6 september 2006 15:42, schreef Guillaume Poirier:
> AFAIK, it's because memory allocation fails, if a disaster occurs
> (badly OOM for instance, ...) and means that my may be better off
> killing the prgm as the OS will probably kill some prgm to free some
> memory. So by not checking if allocation succeeds, you just guarantee
> that in case of OOM, you will be killed by a segfault rather than
> being killed by the kernel OOM killer.
> I'm not sure which way is cleaner...
And on some OSs (embedded), there might not be a separation of
kernel and userspace, thus FFmpeg could effectively overwriting others
With friendly regards,
More information about the ffmpeg-devel