[Top][All Lists]

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

Re: [PATCH] Marking weak alist vectors

From: Han-Wen Nienhuys
Subject: Re: [PATCH] Marking weak alist vectors
Date: Wed, 09 Nov 2005 19:36:25 +0100
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929)

Ludovic Courtès wrote:
Does your patch solve the problem that cyclical structures (values that point back to keys) should also be GC-ed?

I guess you're talking about cyclical structures in doubly-weak alist
vectors.  If so, it apparently does since if both WEAK_VALUES and
WEAK_KEYS are false in both functions, then neither the key nor the
value will ever be marked by those functions.

Actually, I was talking about tables with only weak keys, but strong values.

1.  The tests in `weaks.test' are broken in several ways, not only
    because "we have no way of knowing for certain that the object is
    really dead" as stated there.

You can detect whether objects died; just generate a lot of them, and see what happens to the stats the output of (gc-live-object-stats) after a few GCs.

3.  Given the level of non-determinism I've been able to observe, I'm
    afraid leaks are causing us difficulties.  For instance, while
    testing weakly-key alist vectors "by hand" in a REPL, it occurred to
    me that the weak-key pair would reliably die, *unless* the hash
    table was written (I mean using `write'):

Curious; why does this happen?

> That's the whole point of the test: object properties are used because
> they involve weak hash tables.

In that case, I'm missing the point completely; why do you need this functionality?

 Han-Wen Nienhuys - address@hidden -

reply via email to

[Prev in Thread] Current Thread [Next in Thread]