diff options
author | Richard Henderson <rth@gcc.gnu.org> | 1999-10-13 10:09:18 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 1999-10-13 10:09:18 -0700 |
commit | 005537dfed601a7ec39b4d40f9d0e3bc954f167f (patch) | |
tree | 618d754ad605b42a6cdca53980a97a361d152aa9 /gcc/ggc-none.c | |
parent | 1f1479dc91216e63870c59ad48fdbb0b1c060d82 (diff) | |
download | gcc-005537dfed601a7ec39b4d40f9d0e3bc954f167f.zip gcc-005537dfed601a7ec39b4d40f9d0e3bc954f167f.tar.gz gcc-005537dfed601a7ec39b4d40f9d0e3bc954f167f.tar.bz2 |
Simplified GC interface and other goodies.
From-SVN: r29946
Diffstat (limited to 'gcc/ggc-none.c')
-rw-r--r-- | gcc/ggc-none.c | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/gcc/ggc-none.c b/gcc/ggc-none.c index 4e9ef4a..e05107e 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; } |