emacs-devel
[Top][All Lists]
Advanced

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

Re: Not protecting Lisp objects from GC


From: Gerd Möllmann
Subject: Re: Not protecting Lisp objects from GC
Date: Wed, 29 Jan 2025 05:44:07 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Jeremy Bryant <jb@jeremybryant.net> writes:


> and care a lot about Emacs.

To _very_ varying degrees over the decades, including two with zero
interest. It's a long story :-).

>
> I am a non-expert in GC.
> As such would you have any guidance on how to
> understand the benefits of the igc branch

I recommend starting with admin/igc.org. I'm not a particularly good
explaining things, but I'd hope it's helpful anyway.

> and the 'easiest' entry points into the code for study purposes?

MPS is a library, so one has to understand its API first; igc.org has
links to the MPS documentation. The documentation includes a Guide that
I would start with.

Once you've done that, read the rest of igc.org, and then see how igc.c
uses the API. I'd start here

igc.c:
 5235 void
 5236 init_igc (void)
 5237 {
 5238   /* Returns previous handler.  */
 5239   (void) mps_lib_assert_fail_install (igc_assert_fail);
 5240   global_igc = make_igc ();
 5241   add_main_thread ();
 5242   set_state (IGC_STATE_USABLE_PARKED);
 5243 }

This is called very early when Emacs starts. It sets up everything so
that the GC is usable. Follow the call tree and look up MPS API
functions being called in the MPS Reference.

Then ask questions :-).



reply via email to

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