/* $Id: cpl_memory.h,v 1.11 2007/04/23 14:00:07 llundin Exp $ * * This file is part of the ESO Common Pipeline Library * Copyright (C) 2001-2005 European Southern Observatory * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* * $Author: llundin $ * $Date: 2007/04/23 14:00:07 $ * $Revision: 1.11 $ * $Name: $ */ #ifndef CPL_MEMORY_H #define CPL_MEMORY_H #include #include #include CPL_BEGIN_DECLS void *cpl_malloc(size_t); void *cpl_calloc(size_t, size_t); void *cpl_realloc(void *, size_t); void cpl_free(void *); char *cpl_strdup(const char *); char *cpl_vsprintf(const char *, va_list) #ifdef __GNUC__ __attribute__((format (printf, 1, 0))) #endif ; char * cpl_sprintf(const char *, ...) #ifdef __GNUC__ __attribute__((format (printf, 1, 2))) #endif ; int cpl_memory_is_empty(void); void cpl_memory_dump(void); CPL_END_DECLS #endif /* CPL_MEMORY_H */