summaryrefslogtreecommitdiff
path: root/gcc/ggc-page.c
diff options
context:
space:
mode:
authorraksit <raksit@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-11 18:07:15 +0000
committerraksit <raksit@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-11 18:07:15 +0000
commit781dec7ff49f9f9e2131a20747a847e058a2972d (patch)
tree2c0b96b5a0f4136f8e915c52607211b92233fa21 /gcc/ggc-page.c
parenteef0ab03f1e173c0446ab25b5218c50db288792b (diff)
downloadgcc-781dec7ff49f9f9e2131a20747a847e058a2972d.tar.gz
2008-07-11 Angelo Graziosi <angelo.graziosi@alice.it>
* ggc-page.c (alloc_page): Substituting xmalloc, xcalloc with XNEWVEC and XCNEWVAR macros which add the needed casts. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137722 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ggc-page.c')
-rw-r--r--gcc/ggc-page.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c
index 4ac73d4af4f..98a6c280ef3 100644
--- a/gcc/ggc-page.c
+++ b/gcc/ggc-page.c
@@ -799,7 +799,7 @@ alloc_page (unsigned order)
alloc_size = GGC_QUIRE_SIZE * G.pagesize;
else
alloc_size = entry_size + G.pagesize - 1;
- allocation = xmalloc (alloc_size);
+ allocation = XNEWVEC (char, alloc_size);
page = (char *) (((size_t) allocation + G.pagesize - 1) & -G.pagesize);
head_slop = page - allocation;
@@ -842,7 +842,7 @@ alloc_page (unsigned order)
struct page_entry *e, *f = G.free_pages;
for (a = enda - G.pagesize; a != page; a -= G.pagesize)
{
- e = xcalloc (1, page_entry_size);
+ e = XCNEWVAR (struct page_entry, page_entry_size);
e->order = order;
e->bytes = G.pagesize;
e->page = a;