]>
git.ipfire.org Git - thirdparty/bash.git/blob - lib/malloc/shmalloc.h
1 /* Functions (currently) for use by the shell to do malloc debugging and
3 /* Copyright (C) 2001-2003 Free Software Foundation, Inc.
5 This file is part of GNU Bash, the Bourne-Again SHell.
7 Bash is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 Bash is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with Bash. If not, see <http://www.gnu.org/licenses/>.
25 # if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus)
26 # define __P(protos) protos
28 # define __P(protos) ()
32 /* Generic pointer type. */
35 #if defined (__STDC__)
44 extern PTR_T sh_malloc
__P((size_t, const char *, int));
45 extern PTR_T sh_realloc
__P((PTR_T
, size_t, const char *, int));
46 extern void sh_free
__P((PTR_T
, const char *, int));
48 extern PTR_T sh_memalign
__P((size_t, size_t, const char *, int));
50 extern PTR_T sh_calloc
__P((size_t, size_t, const char *, int));
51 extern void sh_cfree
__P((PTR_T
, const char *, int));
53 extern PTR_T sh_valloc
__P((size_t, const char *, int));
56 extern int malloc_set_trace
__P((int));
57 extern void malloc_set_tracefp (); /* full prototype requires stdio.h */
58 extern void malloc_set_tracefn
__P((char *, char *));
61 extern void mregister_dump_table
__P((void));
62 extern void mregister_table_init
__P((void));
63 extern int malloc_set_register
__P((int));
66 extern void print_malloc_stats
__P((char *));
67 extern void fprint_malloc_stats (); /* full prototype requires stdio.h */
68 extern void trace_malloc_stats
__P((char *, char *));