summaryrefslogtreecommitdiff
path: root/libavutil/mem.c
Commit message (Collapse)AuthorAge
* Move av_fast_{m,re}alloc from lavc to lavu.Anton Khirnov2013-11-14
|
* mem: Make av_strdup allocate using av_reallocMartin Storsjö2013-10-16
| | | | | | | | | This makes sure that pointers from av_strdup are reallocable, which is used in av_dict_set if the AV_DICT_APPEND flag is set. Nothing should rely on pointers from av_strdup being aligned. Signed-off-by: Martin Storsjö <martin@martin.st>
* mem: Handle av_reallocp(..., 0) properlyMartin Storsjö2013-09-20
| | | | | | | Previously this did a double free (and returned an error). Reported-by: Justin Ruggles Signed-off-by: Martin Storsjö <martin@martin.st>
* mem: Introduce av_reallocpLuca Barbato2013-09-16
|
* mem: Do not check unsigned values for negative sizeDiego Biurrun2013-09-05
|
* mem: Improve documentation wording and spellingDiego Biurrun2013-09-05
|
* mem: Add av_realloc_array and av_reallocp_arrayMartin Storsjö2013-06-04
| | | | | | These help avoiding overflows and simplify error handling. Signed-off-by: Martin Storsjö <martin@martin.st>
* av_memcpy_backptr: avoid an infinite loop for back = 0Anton Khirnov2013-02-23
| | | | CC:libav-stable@libav.org
* Remove pointless #undefs of previously forbidden functions.Anton Khirnov2012-12-04
|
* av_memcpy_backptr: optimise some special casesMans Rullgard2012-11-23
| | | | | | | | | - Add special cases for offsets of 2, 3, or 4 bytes. This means the offset is always >4 in the generic case, allowing 32-bit copies to be used there. - Don't use memcpy() for sizes less than 16 bytes. Signed-off-by: Mans Rullgard <mans@mansr.com>
* avutil: Move memcpy_backptr() to mem.cDiego Biurrun2012-10-25
| | | | The function is used elsewhere and does not belong with the LZO code.
* avutil/mem: K&R formatting cosmeticsDiego Biurrun2012-10-20
|
* mem: Don't abort on av_malloc(0) in debug modeMartin Storsjö2012-07-10
| | | | | | This makes the behaviour consistent between debug and release mode. Signed-off-by: Martin Storsjö <martin@martin.st>
* mem: add support for _aligned_malloc() as found on WindowsRonald S. Bultje2012-06-19
| | | | | | | | The check uses check_func_header, since this function is conditionally available depending on the targeted MSVCRT version. Signed-off-by: Martin Storsjö <martin@martin.st>
* mem: Consistently return NULL for av_malloc(0)Martin Storsjö2012-04-10
| | | | | | | | | | | | | | | | | Plain POSIX malloc(0) is allowed to return either NULL or a non-NULL pointer. The calling code should be ready to handle a NULL return as a correct return (instead of a failure) if the size to allocate was 0 - this makes sure the condition is handled in a consistent way across platforms. This also avoids calling posix_memalign(&ptr, 32, 0) on OS X, which returns an invalid pointer (a non-NULL pointer that causes crashes when passed to av_free). Abort in debug mode, to help track down issues related to incorrect handling of this case. Signed-off-by: Martin Storsjö <martin@martin.st>
* cosmetics: Remove extra newlines at EOFAlex Converse2012-01-27
|
* Increase alignment of av_malloc() as needed by AVX ASM.Vitor Sessak2011-04-26
| | | | Signed-off-by: Reinhard Tartler <siretart@tauware.de>
* lavu: remove misc disabled cruftAnton Khirnov2011-04-19
|
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Avoid pointless check before calling freeClément Bœsch2011-02-03
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Change the argument of memory allocation functions from unsigned int to size_tMichael Niedermayer2010-12-04
| | | | | | with the next major bump in libavutil. Originally committed as revision 25871 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove explicit filename from Doxygen @file commands.Diego Biurrun2010-04-20
| | | | | | | | Passing an explicit filename to this command is only necessary if the documentation in the @file block refers to a file different from the one the block resides in. Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add --malloc-prefix to apply a prefix to malloc, free etcMåns Rullgård2010-01-28
| | | | | | | This makes it easy to use a replacement allocator instead of the system default one. Originally committed as revision 21509 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Check return value of posix_memalign and explicitly set pointer to NULL if itPatrik Kullman2009-02-21
| | | | | | fails, patch by Patrik Kullman, patrik yes nu. Originally committed as revision 17495 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use full internal pathname in doxygen @file directives.Diego Biurrun2009-02-01
| | | | | | | Otherwise doxygen complains about ambiguous filenames when files exist under the same name in different subdirectories. Originally committed as revision 16912 to svn://svn.ffmpeg.org/ffmpeg/trunk
* spelling/grammar/consistency review part IDiego Biurrun2009-01-28
| | | | Originally committed as revision 16840 to svn://svn.ffmpeg.org/ffmpeg/trunk
* 10l: Add #undefs for system free/malloc/realloc, which must be used here.Diego Biurrun2009-01-25
| | | | Originally committed as revision 16794 to svn://svn.ffmpeg.org/ffmpeg/trunk
* C files should #include the header files of the same name.Diego Biurrun2009-01-25
| | | | Originally committed as revision 16792 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Do not #include common.h without necessity.Diego Biurrun2009-01-25
| | | | | | | This eliminates the need to work around common.h overriding certain system functions which are required in this header. Originally committed as revision 16776 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Directly #include a bunch of indirectly #included headers.Diego Biurrun2009-01-24
| | | | Originally committed as revision 16748 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: Remove pointless period after copyright statement non-sentences.Diego Biurrun2009-01-19
| | | | Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Change semantic of CONFIG_*, HAVE_* and ARCH_*.Aurelien Jacobs2009-01-13
| | | | | | They are now always defined to either 0 or 1. Originally committed as revision 16590 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use posix_memalign() if available.Ramiro Polla2009-01-07
| | | | Originally committed as revision 16488 to svn://svn.ffmpeg.org/ffmpeg/trunk
* indentMichael Niedermayer2008-05-23
| | | | Originally committed as revision 13251 to svn://svn.ffmpeg.org/ffmpeg/trunk
* make av_strdup(NULL) return NULLMichael Niedermayer2008-05-23
| | | | Originally committed as revision 13250 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Merge declaratio and initialization.Michael Niedermayer2008-04-03
| | | | Originally committed as revision 12677 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Merge declaration and initialization.Michael Niedermayer2008-04-03
| | | | Originally committed as revision 12676 to svn://svn.ffmpeg.org/ffmpeg/trunk
* typo fixesDiego Biurrun2008-03-12
| | | | Originally committed as revision 12428 to svn://svn.ffmpeg.org/ffmpeg/trunk
* misc spelling fixesDiego Biurrun2008-03-10
| | | | Originally committed as revision 12410 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Avoid void*-arithmetic.avcoder2008-02-14
| | | | | | Patch by mvplayer: ffmpeg gmail com Originally committed as revision 11932 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move unaltered av_freep() comments to the header file.Panagiotis Issaris2007-03-05
| | | | Originally committed as revision 8253 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move unaltered av_free() comments to the header file.Panagiotis Issaris2007-03-05
| | | | Originally committed as revision 8252 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move unaltered av_realloc() comments to the header file.Panagiotis Issaris2007-03-05
| | | | Originally committed as revision 8251 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move unaltered av_malloc() comments to the header file.Panagiotis Issaris2007-03-05
| | | | Originally committed as revision 8250 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: Fix another common typo, dependAnt --> dependEnt.Diego Biurrun2007-02-24
| | | | Originally committed as revision 8114 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rename MEMALIGN_HACK to CONFIG_MEMALIGN_HACK, use common code in configureMåns Rullgård2006-11-14
| | | | Originally committed as revision 7025 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Change license headers to say 'FFmpeg' instead of 'this program/this library'Diego Biurrun2006-10-07
| | | | | | and fix GPL/LGPL version mismatches. Originally committed as revision 6577 to svn://svn.ffmpeg.org/ffmpeg/trunk
* move memory functions from avcodec to avutilLuca Barbato2006-09-25
| | | | Originally committed as revision 6330 to svn://svn.ffmpeg.org/ffmpeg/trunk
* revert aligned realloc() changesm this should be identical to r5784Michael Niedermayer2006-08-17
| | | | Originally committed as revision 6008 to svn://svn.ffmpeg.org/ffmpeg/trunk
* trying to fix av_realloc()Michael Niedermayer2006-08-13
| | | | Originally committed as revision 5996 to svn://svn.ffmpeg.org/ffmpeg/trunk