149d3bc91SRichard Lowe /*
2*4d9fdb46SRobert Mustacchi    Copyright (C) 2000,2005 Silicon Graphics, Inc.  All Rights Reserved.
3*4d9fdb46SRobert Mustacchi    Portions Copyright (C) 2008-2011  David Anderson. All Rights Reserved.
4*4d9fdb46SRobert Mustacchi 
5*4d9fdb46SRobert Mustacchi    This program is free software; you can redistribute it
6*4d9fdb46SRobert Mustacchi    and/or modify it under the terms of version 2.1 of the
7*4d9fdb46SRobert Mustacchi    GNU Lesser General Public License as published by the Free
8*4d9fdb46SRobert Mustacchi    Software Foundation.
9*4d9fdb46SRobert Mustacchi 
10*4d9fdb46SRobert Mustacchi    This program is distributed in the hope that it would be
11*4d9fdb46SRobert Mustacchi    useful, but WITHOUT ANY WARRANTY; without even the implied
12*4d9fdb46SRobert Mustacchi    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13*4d9fdb46SRobert Mustacchi    PURPOSE.
14*4d9fdb46SRobert Mustacchi 
15*4d9fdb46SRobert Mustacchi    Further, this software is distributed without any warranty
16*4d9fdb46SRobert Mustacchi    that it is free of the rightful claim of any third person
17*4d9fdb46SRobert Mustacchi    regarding infringement or the like.  Any license provided
18*4d9fdb46SRobert Mustacchi    herein, whether implied or otherwise, applies only to this
19*4d9fdb46SRobert Mustacchi    software file.  Patent licenses, if any, provided herein
20*4d9fdb46SRobert Mustacchi    do not apply to combinations of this program with other
21*4d9fdb46SRobert Mustacchi    software, or any other product whatsoever.
22*4d9fdb46SRobert Mustacchi 
23*4d9fdb46SRobert Mustacchi    You should have received a copy of the GNU Lesser General
24*4d9fdb46SRobert Mustacchi    Public License along with this program; if not, write
25*4d9fdb46SRobert Mustacchi    the Free Software Foundation, Inc., 51 Franklin Street -
26*4d9fdb46SRobert Mustacchi    Fifth Floor, Boston MA 02110-1301, USA.
2749d3bc91SRichard Lowe */
2849d3bc91SRichard Lowe 
2907dc1947SRichard Lowe /* #define DWARF_SIMPLE_MALLOC 1  */
3049d3bc91SRichard Lowe 
31*4d9fdb46SRobert Mustacchi char * _dwarf_get_alloc(Dwarf_Debug, Dwarf_Small, Dwarf_Unsigned);
3249d3bc91SRichard Lowe Dwarf_Debug _dwarf_get_debug(void);
3349d3bc91SRichard Lowe int _dwarf_free_all_of_one_debug(Dwarf_Debug);
34*4d9fdb46SRobert Mustacchi struct Dwarf_Error_s * _dwarf_special_no_dbg_error_malloc(void);
3549d3bc91SRichard Lowe 
36*4d9fdb46SRobert Mustacchi void _dwarf_error_destructor(void *);
3749d3bc91SRichard Lowe 
38*4d9fdb46SRobert Mustacchi /*  Intended for use in memory use investigations.
39*4d9fdb46SRobert Mustacchi     Not a public function. */
40*4d9fdb46SRobert Mustacchi void _dwarf_alloc_tree_counts(Dwarf_Unsigned *allocount,
41*4d9fdb46SRobert Mustacchi     Dwarf_Unsigned *allosum,
42*4d9fdb46SRobert Mustacchi     Dwarf_Unsigned *treecount,
43*4d9fdb46SRobert Mustacchi     Dwarf_Unsigned *treesum,
44*4d9fdb46SRobert Mustacchi     Dwarf_Unsigned *earlydealloccount,
45*4d9fdb46SRobert Mustacchi     Dwarf_Unsigned *earlydeallocsize,
46*4d9fdb46SRobert Mustacchi     Dwarf_Unsigned *unused1,
47*4d9fdb46SRobert Mustacchi     Dwarf_Unsigned *unused2,
48*4d9fdb46SRobert Mustacchi     Dwarf_Unsigned *unused3);
4949d3bc91SRichard Lowe 
5049d3bc91SRichard Lowe 
51*4d9fdb46SRobert Mustacchi /*  ALLOC_AREA_INDEX_TABLE_MAX is the size of the
52*4d9fdb46SRobert Mustacchi     struct ial_s index_into_allocated array in dwarf_alloc.c
5349d3bc91SRichard Lowe */
54*4d9fdb46SRobert Mustacchi #define ALLOC_AREA_INDEX_TABLE_MAX 65
55