diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ggc-page.c | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 53dc3e1..c26bf6e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2014-05-17 Trevor Saunders <tsaunders@mozilla.com> + * ggc-page.c (ggc_handle_finalizers): Add comment. + +2014-05-17 Trevor Saunders <tsaunders@mozilla.com> + * ggc-common.c (ggc_internal_cleared_alloc): Adjust. * ggc-none.c (ggc_internal_alloc): Assert if a finalizer is passed. (ggc_internal_cleared_alloc): Likewise. diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c index b3a1a2a..a8d8d0e 100644 --- a/gcc/ggc-page.c +++ b/gcc/ggc-page.c @@ -1859,6 +1859,11 @@ clear_marks (void) } } +/* Check if any blocks with a registered finalizer have become unmarked. If so + run the finalizer and unregister it because the block is about to be freed. + Note that no garantee is made about what order finalizers will run in so + touching other objects in gc memory is extremely unwise. */ + static void ggc_handle_finalizers () { |