diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-10-13 17:09:18 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-10-13 17:09:18 +0000 |
commit | 7166161172b816ed738a47c9a7d50f0fbd763c6d (patch) | |
tree | 618d754ad605b42a6cdca53980a97a361d152aa9 /gcc/ggc-none.c | |
parent | 3459bb21384e65c9e01d24a56fc6f1f554293671 (diff) | |
download | gcc-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.c | 31 |
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; } |