all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Sebastian <s.walinder@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Org element cache in indirect buffers
Date: Tue, 13 Jun 2023 18:02:21 +0000	[thread overview]
Message-ID: <87wn07qlzm.fsf@localhost> (raw)
In-Reply-To: <CAMBKESWeHCneRwHPWkW_4-xym7OTwPEc65Z-C2WJdjcDFYwocg@mail.gmail.com>

[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>


      parent reply	other threads:[~2023-06-13 20:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-11 12:13 Org element cache in indirect buffers Sebastian Wålinder
2023-06-11 12:51 ` Ihor Radchenko
2023-06-13 10:33   ` Ihor Radchenko
     [not found]     ` <CAMBKESWeHCneRwHPWkW_4-xym7OTwPEc65Z-C2WJdjcDFYwocg@mail.gmail.com>
2023-06-13 18:02       ` Ihor Radchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wn07qlzm.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=s.walinder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.