[FFmpeg-devel] [PATCH 3/3] avutil/mem_internal: use av_max_alloc_get() in ff_fast_malloc()
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Sun May 23 17:10:22 EEST 2021
James Almer:
> On 5/22/2021 7:09 PM, James Almer wrote:
>> This puts ff_fast_malloc() and av_fast_malloc() in line with
>> ff_fast_realloc()
>>
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>> The alternative to this set would be to move av_fast_padded_malloc() from
>> avcodec to avutil, and moving ff_fast_malloc() from mem_internal.h to
>> mem.c, in
>> which case it will no longer be inlined for easy use.
>
> av_fast_padded_malloc() can't be moved since it uses
> AV_INPUT_BUFFER_PADDING_SIZE, so the only alternative is to move
> ff_fast_malloc() to mem.c, have it use max_alloc_size, and make
> av_fast_padded_malloc() call av_fast_mallocz().
>
> If that's preferred to adding a function to get the max alloc value to
> lavu, i'll send a patchset for it.
>
Yeah, that sounds better than adding yet another public function.
- Andreas
More information about the ffmpeg-devel
mailing list