]> gcc.gnu.org Git - gcc.git/blame - gcc/alloc-pool.h
sparc.c (function_arg_pass_by_reference): Return 1 for all modes whose size is greate...
[gcc.git] / gcc / alloc-pool.h
CommitLineData
7f22efe1 1/* Functions to support a pool of allocatable objects
76abd4c6
JZ
2 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003
3 Free Software Foundation, Inc.
7f22efe1 4 Contributed by Daniel Berlin <dan@cgsoftware.com>
76abd4c6 5
7f22efe1
DB
6This file is part of GCC.
7
8GCC is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2, or (at your option)
11any later version.
12
13GCC is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with GCC; see the file COPYING. If not, write to
20the Free Software Foundation, 59 Temple Place - Suite 330,
21Boston, MA 02111-1307, USA. */
22#ifndef ALLOC_POOL_H
23#define ALLOC_POOL_H
24
76abd4c6
JZ
25typedef unsigned long ALLOC_POOL_ID_TYPE;
26
7f22efe1
DB
27typedef struct alloc_pool_list_def
28{
29 struct alloc_pool_list_def *next;
30}
31 *alloc_pool_list;
32
33typedef struct alloc_pool_def
34{
1e0f41c9 35 const char *name;
76abd4c6
JZ
36#ifdef ENABLE_CHECKING
37 ALLOC_POOL_ID_TYPE id;
38#endif
7f22efe1
DB
39 size_t elts_per_block;
40 alloc_pool_list free_list;
41 size_t elts_allocated;
42 size_t elts_free;
43 size_t blocks_allocated;
44 alloc_pool_list block_list;
45 size_t block_size;
46 size_t elt_size;
47}
48 *alloc_pool;
49
4682ae04
AJ
50extern alloc_pool create_alloc_pool (const char *, size_t, size_t);
51extern void free_alloc_pool (alloc_pool);
52extern void *pool_alloc (alloc_pool);
53extern void pool_free (alloc_pool, void *);
1e0f41c9 54extern void dump_alloc_pool_statistics (void);
7f22efe1 55#endif
This page took 0.279294 seconds and 5 git commands to generate.