/* MEMORY: Encapsulation ofa memory allocator with memory_default exception * Copyright (C) 1996, 98, 99, 2001 Achille Braquelaire (achille@labri.fr) * * This file is part of BCL (Basic Library for C programs) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation (Inc., 59 * Temple Place - Suite 330, Boston, MA 02111-1307, USA); 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 * Library 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 */ #ifndef MEMORY_H #define MEMORY_H #include #include "exception.h" extern void *_memory_alloc(size_t size); extern void *memory_alloc(size_t size); extern void *memory_calloc(size_t number_of_elements, size_t size); extern void *memory_realloc(void *p, size_t size); extern void memory_free(void *p); extern void memory_set_functions(void *(*malloc_user_fun)(size_t), void *(*calloc_user_fun)(size_t, size_t), void *(*realloc_user_fun)(void*, size_t), void (*free_user_fun)(void*)); USE_EXCEPTION(memory_default); #endif /* MEMORY_H */