[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MPS: dangling markers
From: |
Gerd Möllmann |
Subject: |
Re: MPS: dangling markers |
Date: |
Sun, 30 Jun 2024 06:41:03 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Pip Cet <pipcet@protonmail.com> writes:
> (Implementing weak hash tables with MPS seems quite difficult, though:
> you can have only one "dependent object" with strong references per
> object with weak references,
Yes, the one dependent object is somewhat limiting. I though yesterday
that using something like a weak doubly-linked list could be the
solution for the markers, but that would require 2 dependent objects,
next and prev. Anyway.
> and it cannot be in a moving pool.
Right.
> And since we can't resize objects that may be pinned by ambiguous
> references, well, the weak hash table implementation would look quite
> different from the strong hash tables we have).
I thought that, very roughly, the following might be doable:
If we make-hash-table with weak keys and/or values, allocate the
Lisp_Hash_Table from the AWL pool using the weak_strong allocation
point. If neither keys nor values are weak, allocate the hash table from
the default pool.
Allocate the key and the value vector according to the hash table's
weakness either from the strong or weak allocation point, or from the
default pool if the table isn't weak at all. (I've split the
key_and_value vector already in two, but you probably noticed that
already.)
Dependent object of the key and value vectors could be the hash table
itself.
> Of course, Stefan's plan is even better :-)
>
> Also, why does igc-info not walk the weak pool? Isn't that where the
> problematic markers are?
Lazyness, it should walk all pools we have :-). I have that as a todo.
Time to do it, I guess.
The weak pool currently only contains the weak vectors for markers, the
markers themselves live in the default pool.
- Re: MPS: dangling markers, (continued)
- Re: MPS: dangling markers, Eli Zaretskii, 2024/06/29
- Re: MPS: dangling markers, Gerd Möllmann, 2024/06/29
- Re: MPS: dangling markers, Ihor Radchenko, 2024/06/29
- Re: MPS: dangling markers, Gerd Möllmann, 2024/06/29
- Re: MPS: dangling markers, Stefan Monnier, 2024/06/29
- Re: MPS: dangling markers, Gerd Möllmann, 2024/06/30
- Re: MPS: dangling markers, Eli Zaretskii, 2024/06/30
- Re: MPS: dangling markers, Stefan Monnier, 2024/06/30
- Re: MPS: dangling markers, Eli Zaretskii, 2024/06/30
- Re: MPS: dangling markers, Pip Cet, 2024/06/30
- Re: MPS: dangling markers,
Gerd Möllmann <=
- Re: MPS: dangling markers, Gerd Möllmann, 2024/06/30
- Re: MPS: dangling markers, Pip Cet, 2024/06/30
- Re: MPS: dangling markers, Gerd Möllmann, 2024/06/30
- Re: MPS: dangling markers, Pip Cet, 2024/06/30
- Re: MPS: dangling markers, Gerd Möllmann, 2024/06/30
- Re: MPS: dangling markers, Pip Cet, 2024/06/30
- Re: MPS: dangling markers, Gerd Möllmann, 2024/06/30
- Re: MPS: dangling markers, Pip Cet, 2024/06/30
- Re: MPS: dangling markers, Eli Zaretskii, 2024/06/30
- Re: MPS: dangling markers, Gerd Möllmann, 2024/06/30