From ec4d7730c818bb14591b9d0c82f92e73cadf27fb Mon Sep 17 00:00:00 2001 From: Angelo Graziosi Date: Fri, 11 Jul 2008 20:07:15 +0200 Subject: [PATCH] ggc-page.c (alloc_page): Substituting xmalloc... 2008-07-11 Angelo Graziosi * ggc-page.c (alloc_page): Substituting xmalloc, xcalloc with XNEWVEC and XCNEWVAR macros which add the needed casts. From-SVN: r137722 --- gcc/ChangeLog | 7 +++++++ gcc/ggc-page.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 04004fa76df..6db32ef25b3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2008-07-11 Angelo Graziosi + + * ggc-page.c (alloc_page): + Substituting xmalloc, xcalloc with + XNEWVEC and XCNEWVAR macros which add the + needed casts. + 2008-07-11 Richard Guenther PR tree-optimization/36765 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; -- 2.30.2