[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Org element cache in indirect buffers
From: |
Ihor Radchenko |
Subject: |
Re: Org element cache in indirect buffers |
Date: |
Tue, 13 Jun 2023 18:02:21 +0000 |
[Adding Org ML back to CC]
Sebastian <s.walinder@gmail.com> writes:
> Thank you so much for the detailed explanation!
>
> Maybe memory-report is counting what's at the end of the reference, and
> your change fixes it.
memory-report is counting buffer data separately, even when buffer-local
variables reference to the same data objects.
I just reported this upstream:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64050
My change simply clears the references to AVL-tree roots that are copied
over when Emacs clones the buffer. The edge cases I was talking about
are when the main AVL-tree changes its root. That would make indirect
buffer actually keep reference to obsolete root and the rest of the
obsolete AVL-tree, preventing it from being garbage-collected.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>