Mercurial > hg > xemacs-beta
diff src/alloc.c @ 1590:03009473262a
[xemacs-hg @ 2003-07-26 14:00:27 by michaels]
2003-07-24 Mike Sperber <mike@xemacs.org>
* lisp.h:
* data.c:
(init_marking_ephemerons):
(continue_marking_ephemerons):
(finish_marking_ephemerons):
(prune_ephemerons):
* alloc.c (garbage_collect_1): Rewrite the ephemeron marker once
again to allow ephemerons to be used for implementing simple
object finalization.
* data.c (Fmake_ephemeron): Fix comments
author | michaels |
---|---|
date | Sat, 26 Jul 2003 14:00:28 +0000 |
parents | 6e7ace1ab32d |
children | ac1be85b4a5f |
line wrap: on
line diff
--- a/src/alloc.c Fri Jul 25 21:52:27 2003 +0000 +++ b/src/alloc.c Sat Jul 26 14:00:28 2003 +0000 @@ -4609,10 +4609,19 @@ a weak hash table might be unmarked, but after processing a later weak hash table, the former one might get marked. So we have to iterate until nothing more gets marked. */ - + + init_marking_ephemerons (); while (finish_marking_weak_hash_tables () > 0 || finish_marking_weak_lists () > 0 || - finish_marking_ephemerons () > 0) + continue_marking_ephemerons () > 0) + ; + + /* At this point, we know which objects need to be finalized: we + still need to resurrect them */ + + while (finish_marking_ephemerons () > 0 || + finish_marking_weak_lists () > 0 || + finish_marking_weak_hash_tables () > 0) ; /* And prune (this needs to be called after everything else has been