1 /* GNU Mailutils -- a suite of utilities for electronic mail 2 Copyright (C) 2008-2021 Free Software Foundation, Inc. 3 4 This library is free software; you can redistribute it and/or 5 modify it under the terms of the GNU Lesser General Public 6 License as published by the Free Software Foundation; either 7 version 3 of the License, or (at your option) any later version. 8 9 This library is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 Lesser General Public License for more details. 13 14 You should have received a copy of the GNU Lesser General 15 Public License along with this library. If not, see 16 <http://www.gnu.org/licenses/>. */ 17 18 #ifndef _MAILUTILS_ALLOC_H 19 #define _MAILUTILS_ALLOC_H 20 21 #include <mailutils/types.h> 22 23 # ifndef MU_ATTRIBUTE_NORETURN 24 # define MU_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) 25 # endif 26 27 extern void (*mu_alloc_die_hook) (void); 28 void mu_alloc_die (void) MU_ATTRIBUTE_NORETURN; 29 void *mu_alloc (size_t); 30 void *mu_calloc (size_t, size_t); 31 void *mu_zalloc (size_t size); 32 void *mu_realloc (void *, size_t); 33 char *mu_strdup (const char *); 34 void *mu_2nrealloc (void *, size_t *, size_t); 35 36 #endif 37