summaryrefslogtreecommitdiffstats
path: root/libavutil/mem.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-21 15:12:36 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-08-23 13:50:19 +0200
commit21f70940ae106bfffa07e73057cdb4b5e81a767a (patch)
treeb3133536784ce15731dc24c28f902be30528d17d /libavutil/mem.h
parent9d5ea8de56fcdc77daa01cf0d413dfe6101de30a (diff)
downloadffmpeg-streaming-21f70940ae106bfffa07e73057cdb4b5e81a767a.zip
ffmpeg-streaming-21f70940ae106bfffa07e73057cdb4b5e81a767a.tar.gz
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>
Diffstat (limited to 'libavutil/mem.h')
-rw-r--r--libavutil/mem.h24
1 files changed, 0 insertions, 24 deletions
diff --git a/libavutil/mem.h b/libavutil/mem.h
index 7f0c610..f9d8884 100644
--- a/libavutil/mem.h
+++ b/libavutil/mem.h
@@ -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.
*/
OpenPOWER on IntegriCloud