summaryrefslogtreecommitdiff
path: root/gcc/alloc-pool.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/alloc-pool.c')
-rw-r--r--gcc/alloc-pool.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/alloc-pool.c b/gcc/alloc-pool.c
index d5d1fab79af..b22869fe787 100644
--- a/gcc/alloc-pool.c
+++ b/gcc/alloc-pool.c
@@ -119,7 +119,7 @@ alloc_pool
create_alloc_pool (const char *name, size_t size, size_t num)
{
alloc_pool pool;
- size_t pool_size, header_size;
+ size_t header_size;
#ifdef GATHER_STATISTICS
struct alloc_pool_descriptor *desc;
#endif
@@ -141,11 +141,8 @@ create_alloc_pool (const char *name, size_t size, size_t num)
/* Um, we can't really allocate 0 elements per block. */
gcc_assert (num);
- /* Find the size of the pool structure, and the name. */
- pool_size = sizeof (struct alloc_pool_def);
-
- /* and allocate that much memory. */
- pool = xmalloc (pool_size);
+ /* Allocate memory for the pool structure. */
+ pool = XNEW (struct alloc_pool_def);
/* Now init the various pieces of our pool structure. */
pool->name = /*xstrdup (name)*/name;