emacs-devel
[Top][All Lists]
Advanced

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

Re: Failing to GC killed buffers considered harmful


From: Stefan Monnier
Subject: Re: Failing to GC killed buffers considered harmful
Date: Tue, 31 Mar 2020 12:52:48 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> The patch below seems to work.
> But it changes gcstat definitions (killed buffers are no longer
> counted towards total_buffers).

Indeed (instead all the `struct buffer` objects are now included in the
count of (pseudo)vectors).  I find this of no consequence and I don't
think the GC algorithm should adapt to the gcstat (it should be the
other way around).

>> The only worrisome part I think is that `live_buffer_holding` allowed
>> pointers into buffer objects, whereas `live_vector_p` only treats
>> pointers to the beginning of the object as a valid reference.
> Uh, I don't see how the second part of that statement is true.

Indeed it's not.  I had forgotten that Paul had also changed the
live_vector_holding code in the same way.  Great!

>> Not sure why buffers would be more likely to have valid pointers into
>> them (and can't remember discussions about that either),
> buffer text.

The buffer text is not stored within the `struct buffer` object, so no.
But that's irrelevant since I was confused anyway.

>> so I assume the difference was not important (it just happened to be
>> easier to support that for buffers).
> Which difference, I still don't understand.

You do ;-)

> Next, it might be nice to have anonymous buffers that are
> garbage-collected automatically and don't need to be killed. *ducks*

Did I hear something or was it just the wind?


        Stefan




reply via email to

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