1 /* Functions (currently) for use by the shell to do malloc debugging and
3 /* Copyright (C) 2001 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
23 # if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus)
24 # define __P(protos) protos
26 # define __P(protos) ()
30 /* Generic pointer type. */
33 #if defined (__STDC__)
42 extern PTR_T sh_malloc __P((size_t, const char *, int));
43 extern PTR_T sh_realloc __P((PTR_T, size_t, const char *, int));
44 extern void sh_free __P((PTR_T, const char *, int));
46 extern PTR_T sh_memalign __P((unsigned int, size_t, const char *, int));
48 extern PTR_T sh_calloc __P((size_t, size_t, const char *, int));
49 extern void sh_cfree __P((PTR_T, const char *, int));
51 extern PTR_T sh_valloc __P((size_t, const char *, int));
54 extern int malloc_set_trace __P((int));
55 extern void malloc_set_tracefp (); /* full prototype requires stdio.h */
58 extern void mregister_dump_table __P((void));
59 extern void mregister_table_init __P((void));
60 extern int malloc_set_register __P((int));
63 extern void print_malloc_stats __P((char *));
64 extern void fprint_malloc_stats (); /* full prototype requires stdio.h */
65 extern void trace_malloc_stats __P((char *, char *));