[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hash Tables and GC



    Date: Wed, 7 Sep 88 15:49 EDT
    From: Michael Greenwald <Greenwald@STONY-BROOK.SCRC.Symbolics.COM>

	Date: Wed, 7 Sep 88 11:52 PDT
	From: DDYER@RIVERSIDE.SCRC.Symbolics.COM


	Just to throw a little light into this discussion:   On Symbolics systems there
	is a list of forms to be evaluated before any gc flip (ephemeral or dynamic).
	It's possible to implement whatever kind of weak pointers strategy you want by 
	explicitly clearing whatever pointers are "weak" before the flip occurs.  The
	list is called SI:GC-EVERY-FLIP-LIST

    How does this tell you whether there *are* any non-weak pointers to the
    object in question?  

The main point of the desire for weak pointers is to free storage being
held by the pointers.   SI:GC-EVERY-FLIP-LIST can't tell you that
removing a pointer will definitely free storage, but it does let you
remove pointers that you don't need and that you know will probably free
storage.

For example, I've used it to empty the free pool of a resource, and I've
used it to "clean" a cache of all obsolete items.