[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MPS: staticpro everything
From: |
Helmut Eller |
Subject: |
Re: MPS: staticpro everything |
Date: |
Wed, 01 May 2024 18:06:19 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>> I don't know. I only looked at the global variables. Maybe there isn't
>> one of type struct it. Or maybe I overlooked it.
>
> So the problem is that bidi_cache is global, and it holds bidi_it
> objects, which have a pointer to 'struct window'?
Exactly. Somebody could follow the path bidi_cache -> bidi_it ->
window. And if window moves, we must update bidi_it. But bidi_it
objects are normally not scanned, because they aren't allocated in an
MPS pool (I think). So we need to do it some other way. E.g. by
registering bidi_cache as root with mps_root_create and then our special
scan code follows the path to bidi_cache -> bidi_it to update the
reference to window.
Another solution would be to always allocate bidi_it objects with
igc_xzalloc_ambig. Then MPS is forced to keep window in place. But the
bidi_it structure is rather large so this might be somewhat costly,
because MPS must then scan all fields in bidi_it conservatively.
>> > This goes back to my other questions about MPS GC: which pointers to
>> > what objects should be audited for possible need of "doing something"?
>>
>> For all exact references to objects in MPS pools we need to do
>> something. We need to update them when our scan method is called.
>> If we want to store exact references in global variables or in
>> objects that are not normally scanned than we must register them as
>> roots.
>
> Sorry, I don't think I understand what is "exact reference".
In MPS we classify references either as exact or ambiguous. For exact
references we are certain that they point to an MPS managed object. For
ambiguous references we aren't sure: it could be a reference to an
object or it could just be an integer. When MPS scans the stack, it
treats all bit patterns there as ambiguous references.
- Re: MPS: staticpro everything, (continued)
- Re: MPS: staticpro everything, Helmut Eller, 2024/05/01
- Re: MPS: staticpro everything, Eli Zaretskii, 2024/05/01
- Re: MPS: staticpro everything, Helmut Eller, 2024/05/01
- Re: MPS: staticpro everything, Gerd Möllmann, 2024/05/01
- Re: MPS: staticpro everything, Eli Zaretskii, 2024/05/01
- Re: MPS: staticpro everything,
Helmut Eller <=
- Re: MPS: staticpro everything, Eli Zaretskii, 2024/05/02
- Re: MPS: staticpro everything, Gerd Möllmann, 2024/05/02
- Re: MPS: staticpro everything, Eli Zaretskii, 2024/05/02
- Re: MPS: staticpro everything, Gerd Möllmann, 2024/05/02
- Re: MPS: staticpro everything, Eli Zaretskii, 2024/05/02
- Re: MPS: staticpro everything, Gerd Möllmann, 2024/05/02
- Re: MPS: staticpro everything, Po Lu, 2024/05/02
- Re: MPS: staticpro everything, Gerd Möllmann, 2024/05/02
- Re: MPS: staticpro everything, Eli Zaretskii, 2024/05/02
- Re: MPS: staticpro everything, Gerd Möllmann, 2024/05/02