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

Re: MCL's make-hash-table

At  5:52 PM 1/20/94 -0700, Shannon V Spires wrote:
>What are the keywords :elements-per-bucket, :weak,
>and :finalizable for in MCL's implementation of
>make-hash-table. These are not documented in

:elements-per-bucket is no longer relevant. It was a parameter to
the old MCL 1.3 hash table code which hashed to an alist. The new code
uses a single vector for hashing.

:WEAK can take three values - NIL, :KEY or :VALUE. A weak hash table is
handled specially by the garbage collector. If the weak component of
a table entry is not referenced by anything but the hash table entry,
that entry will be deleted from the hash table. A table that is
weak on its :KEY, must be an EQ hash table. A table that is weak
on its :VALUE can have any :TEST value.

:finalizable was a feature that we planned to include in the new hash
tables. It would have been an extension of weak hash tables that
notified user code of deleted table values, so that your could
do something about it (e.g. swap out the contents of persistent object that
isn't referenced in memory anymore). We did not finish implenting this
feature in time for 2.0 (nor has anyone worked on it since then).