/* Sparse array-based bitmaps.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008 Free Software Foundation, Inc.
Contributed by Daniel Berlin <dberlin@dberlin.org>
This file is part of GCC.
newsize += newsize / 4;
map->n_elts = newsize;
- map->elts = xrealloc (map->elts, sizeof (EBITMAP_ELT_TYPE) * newsize);
+ map->elts = XRESIZEVEC (EBITMAP_ELT_TYPE, map->elts, newsize);
}
/* Grow the internal word array for MAP so it is at least SIZE
{
if (size > 0)
{
- map->elts = xmalloc (sizeof (EBITMAP_ELT_TYPE) * size);
+ map->elts = XNEWVEC (EBITMAP_ELT_TYPE, size);
map->n_elts = size;
}
else
ebitmap
ebitmap_alloc (unsigned int size)
{
- ebitmap ret = xmalloc (sizeof (struct ebitmap_def));
+ ebitmap ret = XNEW (struct ebitmap_def);
if (size == 0)
size = EBITMAP_ELT_BITS;
ebitmap_array_init (ret, (size + EBITMAP_ELT_BITS - 1) / EBITMAP_ELT_BITS);
}
}
newarraysize = src->numwords + dst->numwords;
- newarray = xmalloc (newarraysize * sizeof (EBITMAP_ELT_TYPE));
+ newarray = XNEWVEC (EBITMAP_ELT_TYPE, newarraysize);
EXECUTE_IF_SET_IN_SBITMAP (tempmask, 0, i, sbi)
{
}
}
newarraysize = src1->numwords + src2->numwords;
- newarray = xmalloc (newarraysize * sizeof (EBITMAP_ELT_TYPE));
+ newarray = XNEWVEC (EBITMAP_ELT_TYPE, newarraysize);
EXECUTE_IF_SET_IN_SBITMAP (tempmask, 0, i, sbi)
{
sbitmap_copy (tempmask, src1->wordmask);
newarraysize = src1->numwords;
- newarray = xmalloc (newarraysize * sizeof (EBITMAP_ELT_TYPE));
+ newarray = XNEWVEC (EBITMAP_ELT_TYPE, newarraysize);
EXECUTE_IF_SET_IN_SBITMAP (src1->wordmask, 0, i, sbi)
{