summaryrefslogtreecommitdiff
path: root/gcc/ggc-none.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@gcc.gnu.org>1999-10-13 10:09:18 -0700
committerRichard Henderson <rth@gcc.gnu.org>1999-10-13 10:09:18 -0700
commit005537dfed601a7ec39b4d40f9d0e3bc954f167f (patch)
tree618d754ad605b42a6cdca53980a97a361d152aa9 /gcc/ggc-none.c
parent1f1479dc91216e63870c59ad48fdbb0b1c060d82 (diff)
downloadgcc-005537dfed601a7ec39b4d40f9d0e3bc954f167f.tar.gz
Simplified GC interface and other goodies.
From-SVN: r29946
Diffstat (limited to 'gcc/ggc-none.c')
-rw-r--r--gcc/ggc-none.c31
1 files changed, 8 insertions, 23 deletions
diff --git a/gcc/ggc-none.c b/gcc/ggc-none.c
index 4e9ef4aacd7..e05107ec8db 100644
--- a/gcc/ggc-none.c
+++ b/gcc/ggc-none.c
@@ -35,28 +35,13 @@
/* For now, keep using the old obstack scheme in the gen* programs. */
int ggc_p = 0;
-rtx
-ggc_alloc_rtx (nslots)
- int nslots;
+void *
+ggc_alloc_obj (size, zero)
+ size_t size;
+ int zero;
{
- int size = sizeof(struct rtx_def) + (nslots - 1) * sizeof(rtunion);
- rtx n;
-
- n = (rtx) xmalloc (size);
- bzero ((char *) n, size);
-
- return n;
-}
-
-rtvec
-ggc_alloc_rtvec (nelt)
- int nelt;
-{
- int size = sizeof (struct rtvec_def) + (nelt - 1) * sizeof (rtx);
- rtvec v;
-
- v = (rtvec) xmalloc (size);
- bzero ((char *) v, size);
-
- return v;
+ void *p = xmalloc (size);
+ if (zero)
+ memset (p, 0, size);
+ return p;
}