Commit ec4d7730 by Angelo Graziosi Committed by Raksit Ashok

ggc-page.c (alloc_page): Substituting xmalloc...

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.

From-SVN: r137722
parent 760b18ad
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.
2008-07-11 Richard Guenther <rguenther@suse.de> 2008-07-11 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36765 PR tree-optimization/36765
......
...@@ -799,7 +799,7 @@ alloc_page (unsigned order) ...@@ -799,7 +799,7 @@ alloc_page (unsigned order)
alloc_size = GGC_QUIRE_SIZE * G.pagesize; alloc_size = GGC_QUIRE_SIZE * G.pagesize;
else else
alloc_size = entry_size + G.pagesize - 1; 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); page = (char *) (((size_t) allocation + G.pagesize - 1) & -G.pagesize);
head_slop = page - allocation; head_slop = page - allocation;
...@@ -842,7 +842,7 @@ alloc_page (unsigned order) ...@@ -842,7 +842,7 @@ alloc_page (unsigned order)
struct page_entry *e, *f = G.free_pages; struct page_entry *e, *f = G.free_pages;
for (a = enda - G.pagesize; a != page; a -= G.pagesize) 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->order = order;
e->bytes = G.pagesize; e->bytes = G.pagesize;
e->page = a; e->page = a;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment