summaryrefslogtreecommitdiff
path: root/gcc/ggc-none.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1999-10-13 17:09:18 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1999-10-13 17:09:18 +0000
commit7166161172b816ed738a47c9a7d50f0fbd763c6d (patch)
tree618d754ad605b42a6cdca53980a97a361d152aa9 /gcc/ggc-none.c
parent3459bb21384e65c9e01d24a56fc6f1f554293671 (diff)
downloadgcc-7166161172b816ed738a47c9a7d50f0fbd763c6d.tar.gz
Simplified GC interface and other goodies.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29946 138bc75d-0d04-0410-961f-82ee72b054a4
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;
}