Blame include/programs/xmalloc.h
|
Packit |
6c4009 |
/* Memory related definitions for program modules.
|
|
Packit |
6c4009 |
Copyright (C) 1998-2018 Free Software Foundation, Inc.
|
|
Packit |
6c4009 |
This file is part of the GNU C Library.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
This program is free software; you can redistribute it and/or modify
|
|
Packit |
6c4009 |
it under the terms of the GNU General Public License as published
|
|
Packit |
6c4009 |
by the Free Software Foundation; version 2 of the License, or
|
|
Packit |
6c4009 |
(at your option) any later version.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
This program is distributed in the hope that it will be useful,
|
|
Packit |
6c4009 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
6c4009 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
6c4009 |
GNU General Public License for more details.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
You should have received a copy of the GNU General Public License
|
|
Packit |
6c4009 |
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#ifndef _XMALLOC_H
|
|
Packit |
6c4009 |
#define _XMALLOC_H 1
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#include <sys/cdefs.h>
|
|
Packit |
6c4009 |
#include <stddef.h>
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Prototypes for a few program-wide used functions. */
|
|
Packit |
6c4009 |
extern void *xmalloc (size_t n)
|
|
Packit |
6c4009 |
__attribute_malloc__ __attribute_alloc_size__ ((1));
|
|
Packit |
6c4009 |
extern void *xcalloc (size_t n, size_t s)
|
|
Packit |
6c4009 |
__attribute_malloc__ __attribute_alloc_size__ ((1, 2));
|
|
Packit |
6c4009 |
extern void *xrealloc (void *o, size_t n)
|
|
Packit |
6c4009 |
__attribute_malloc__ __attribute_alloc_size__ ((2));
|
|
Packit |
6c4009 |
extern char *xstrdup (const char *) __attribute_malloc__;
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#endif /* xmalloc.h */
|