1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avutil/mem: remove av_realloc / av_malloc incompatibility warning

memalign() is not guranteed to be compatible with free() or realloc()
and for platforms in this category we have --enable-memalign-hack
(which should be enabled automatically if such system is detected)
Trying to somehow half support systems that can free() memalign memory
but not reallocate it seems not worth the amount of work needed to
keep 2 then incompatible allocation systems and ensure their
seperation. That is unless this would affect a major platform
on which we want to avoid the memalign hack code

The warnings also cause wasted time and effort as people try
to maintain a separation that does not exist currently.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2015-04-21 15:12:36 +02:00 committed by Michael Niedermayer
parent 9d5ea8de56
commit 21f70940ae

View File

@ -252,12 +252,6 @@ void *av_calloc(size_t nmemb, size_t size) av_malloc_attrib;
* @return Pointer to a newly-reallocated block or `NULL` if the block
* cannot be reallocated or the function is used to free the memory block
*
* @warning Pointers originating from the av_malloc() family of functions must
* not be passed to av_realloc(). The former can be implemented using
* memalign() (or other functions), and there is no guarantee that
* pointers from such functions can be passed to realloc() at all.
* The situation is undefined according to POSIX and may crash with
* some libc implementations.
* @warning Unlike av_malloc(), the returned pointer is not guaranteed to be
* correctly aligned.
* @see av_fast_realloc()
@ -281,12 +275,6 @@ void *av_realloc(void *ptr, size_t size) av_alloc_size(2);
*
* @return Zero on success, an AVERROR error code on failure
*
* @warning Pointers originating from the av_malloc() family of functions must
* not be passed to av_reallocp(). The former can be implemented using
* memalign() (or other functions), and there is no guarantee that
* pointers from such functions can be passed to realloc() at all.
* The situation is undefined according to POSIX and may crash with
* some libc implementations.
* @warning Unlike av_malloc(), the allocated memory is not guaranteed to be
* correctly aligned.
*/
@ -324,12 +312,6 @@ void *av_realloc_f(void *ptr, size_t nelem, size_t elsize);
* @return Pointer to a newly-reallocated block or NULL if the block
* cannot be reallocated or the function is used to free the memory block
*
* @warning Pointers originating from the av_malloc() family of functions must
* not be passed to av_realloc(). The former can be implemented using
* memalign() (or other functions), and there is no guarantee that
* pointers from such functions can be passed to realloc() at all.
* The situation is undefined according to POSIX and may crash with
* some libc implementations.
* @warning Unlike av_malloc(), the allocated memory is not guaranteed to be
* correctly aligned.
* @see av_reallocp_array()
@ -350,12 +332,6 @@ av_alloc_size(2, 3) void *av_realloc_array(void *ptr, size_t nmemb, size_t size)
*
* @return Zero on success, an AVERROR error code on failure
*
* @warning Pointers originating from the av_malloc() family of functions must
* not be passed to av_realloc(). The former can be implemented using
* memalign() (or other functions), and there is no guarantee that
* pointers from such functions can be passed to realloc() at all.
* The situation is undefined according to POSIX and may crash with
* some libc implementations.
* @warning Unlike av_malloc(), the allocated memory is not guaranteed to be
* correctly aligned.
*/