emacs-devel
[Top][All Lists]
Advanced

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

Re: MPS image cache


From: Gerd Möllmann
Subject: Re: MPS image cache
Date: Fri, 03 May 2024 13:22:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Helmut Eller <eller.helmut@gmail.com> writes:

> On Fri, May 03 2024, Gerd Möllmann wrote:
>
>> I think I have one: struct terminal's image_cache is not traced. AFAICS,
>> the cache is malloc'd and contains struct image which is an MPS object.
>>
>> WDYT?
>
> Two options come to mind:
>   1) trace it in fix_terminal
>   2) register terminal.c:terminal_list as root.
>
> It seems to me that creating a root is more "correct".

I'm meanhile tending ta the third option: make iamge_cache an MPS object
like face_cache. For a reason that's proobably the reason why I made
fache_cache an MPS object:

While we scan an object, MPS gives us exclusive access to it. I think we
want that for these caches, so that scanning does not interfere iwth the
client modifying the cache?

Right?

> I have a similar problem with xterm.c:x_display_list which could be
> registered as root or traced e.g. fix_frame.  (Also note that struct
> struct terminal contains a x_display_info, which is probably the same as
> the in x_display_list.)
>
> So maybe we should indeed register terminal_list and as part of the
> scan function, also trace the display_info.
>
> There is a bit of an issue with proper initialization of the structs
> pointed to by those roots.  E.g. x_term_init uses xzalloc, puts pointers
> into the struct, and only then stores the pointer to the struct in
> x_display_list.  So what should be the root, the struct (registred
> immediately after the call to xzalloc) or the global variable
> x_display_list?

Hm.



reply via email to

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