• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

libavutil/mem.h

Go to the documentation of this file.
00001 /*
00002  * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
00003  *
00004  * This file is part of FFmpeg.
00005  *
00006  * FFmpeg is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * FFmpeg is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with FFmpeg; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00019  */
00020 
00026 #ifndef AVUTIL_MEM_H
00027 #define AVUTIL_MEM_H
00028 
00029 #include "common.h"
00030 
00031 #if AV_GCC_VERSION_AT_LEAST(3,1)
00032     #define av_malloc_attrib __attribute__((__malloc__))
00033 #else
00034     #define av_malloc_attrib
00035 #endif
00036 
00037 #if (!defined(__ICC) || __ICC > 1100) && AV_GCC_VERSION_AT_LEAST(4,3)
00038     #define av_alloc_size(n) __attribute__((alloc_size(n)))
00039 #else
00040     #define av_alloc_size(n)
00041 #endif
00042 
00051 void *av_malloc(unsigned int size) av_malloc_attrib av_alloc_size(1);
00052 
00065 void *av_realloc(void *ptr, unsigned int size) av_alloc_size(2);
00066 
00075 void av_free(void *ptr);
00076 
00085 void *av_mallocz(unsigned int size) av_malloc_attrib av_alloc_size(1);
00086 
00093 char *av_strdup(const char *s) av_malloc_attrib;
00094 
00102 void av_freep(void *ptr);
00103 
00104 #endif /* AVUTIL_MEM_H */

Generated on Tue Nov 4 2014 12:59:24 for ffmpeg by  doxygen 1.7.1