emacs-devel
[Top][All Lists]
Advanced

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

Re: MPS: a random backtrace while toying with gdb


From: Gerd Möllmann
Subject: Re: MPS: a random backtrace while toying with gdb
Date: Mon, 01 Jul 2024 21:34:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Ihor Radchenko <yantar92@posteo.net> writes:

> Note that our SIGCHLD signal handler itself does not re-enter malloc
> (igc_malloc in our case). It just tries to access the memory arena that
> is in transient state (in process of allocation).

I think you are missing the read/write barriers that MPS puts on its
memory.

Consider a single object O. At some point in time, MPS copies O to a new
address O', as part of the copying GC algorithm. In O it leaves a
"tombstone" which tells where O' is now found. Then it puts a barrier on
O, so that any access to O let's MPS fix the reference. (All via
functions in igc.c. See dflt_fwd which creates the tombstone.)

> I do not see why the same cannot happen with vanilla malloc, unless, of
> course, it blocks memory much more granularly, guaranteeing that live
> objects are always reachable.

I can't follow, but I guess you missed that/why MPS puts barriers on
memory, and why it gets invoked because of that, necessarily.



reply via email to

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