diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-10-29 04:17:33 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-10-29 04:17:33 +0000 |
commit | 4e00b6fd23bf82e4038e115609361fb0c62465f7 (patch) | |
tree | 8885ce2ea35f645ae60061b2f77bd345ad926d71 /gcc/ggc-simple.c | |
parent | 637be39f421b23c745f14f52d76daf974cc93460 (diff) | |
download | gcc-4e00b6fd23bf82e4038e115609361fb0c62465f7.tar.gz |
* ggc.h (struct ggc_statistics): New type.
(ggc_get_size): New function.
(ggc_print_statistics): Likewise.
* ggc-common.c (ggc_stats): New variable.
(ggc_mark_rtx_children): Keep statistics.
(ggc_mark_tree_children): Likewise.
(ggc_print_statistics): New function.
* ggc-page.c (struct globals): Add bytes_mapped field.
(alloc_anon): Update it.
(release_pages): Likewise.
(ggc_get_size): New function.
(ggc_page_print_statistics): New function.
* ggc-simple.c (ggc_get_size): New function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30251 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ggc-simple.c')
-rw-r--r-- | gcc/ggc-simple.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ggc-simple.c b/gcc/ggc-simple.c index f665487cd53..194863edc7d 100644 --- a/gcc/ggc-simple.c +++ b/gcc/ggc-simple.c @@ -253,6 +253,15 @@ ggc_mark_if_gcable (p) G.objects += 1; } +size_t +ggc_get_size (p) + void *p; +{ + struct ggc_mem *x + = (struct ggc_mem *) ((char *)p - offsetof (struct ggc_mem, u)); + return x->size; +} + static void clear_marks (x) struct ggc_mem *x; |