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