qfits_memory.h

00001 /* $Id: qfits_memory.h,v 1.1.1.1 2008/11/03 13:40:49 agabasch Exp $
00002  *
00003  * This file is part of the ESO QFITS Library
00004  * Copyright (C) 2001-2004 European Southern Observatory
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program 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
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00021 /*
00022  * $Author: agabasch $
00023  * $Date: 2008/11/03 13:40:49 $
00024  * $Revision: 1.1.1.1 $
00025  * $Name: midi-2_7_0 $
00026  */
00027 
00028 #ifndef QFITS_MEMORY_H
00029 #define QFITS_MEMORY_H
00030 
00031 /*-----------------------------------------------------------------------------
00032                                    Includes
00033  -----------------------------------------------------------------------------*/
00034 
00035 #include <stdio.h>
00036 #include <stdlib.h>
00037 #include <string.h>
00038 
00039 /*-----------------------------------------------------------------------------
00040                                    Defines
00041  -----------------------------------------------------------------------------*/
00042 
00043 #define qfits_malloc(s)         qfits_memory_malloc(s,      __FILE__,__LINE__)
00044 #define qfits_calloc(n,s)       qfits_memory_calloc(n,s,    __FILE__,__LINE__)
00045 #define qfits_realloc(p,s)      qfits_memory_realloc(p,s,   __FILE__,__LINE__)
00046 #define qfits_free(p)           qfits_memory_free(p,        __FILE__,__LINE__)
00047 #define qfits_strdup(s)         qfits_memory_strdup(s,      __FILE__,__LINE__)
00048 #define qfits_falloc(f,o,s)     qfits_memory_falloc(f,o,s,  __FILE__,__LINE__)
00049 #define qfits_fdealloc(f,o,s)   qfits_memory_fdealloc(f,o,s,__FILE__,__LINE__)
00050 
00051 /*-----------------------------------------------------------------------------
00052                                Function prototypes
00053  -----------------------------------------------------------------------------*/
00054 
00055 /* *********************************************************************** */
00056 /* These functions have to be called by the assiciated macro defined above */
00057 void * qfits_memory_malloc(size_t, const char *, int) ;
00058 void * qfits_memory_calloc(size_t, size_t, const char *, int) ;
00059 void * qfits_memory_realloc(void *, size_t, const char *, int) ;
00060 void   qfits_memory_free(void *, const char *, int) ;
00061 char * qfits_memory_strdup(const char *, const char *, int) ;
00062 char * qfits_memory_falloc(char *, size_t, size_t *, const char *, int) ;
00063 void qfits_memory_fdealloc(void *, size_t, size_t, const char *, int) ;
00064 /* *********************************************************************** */
00065 
00066 void qfits_memory_status(void) ;
00067 int qfits_memory_is_empty(void) ;
00068 
00069 #endif

Generated on 11 Feb 2011 for C Standard Library Extensions by  doxygen 1.6.1