From: martin rudalics <rudalics@gmx.at>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109890: Do not mark objects from deleted buffers, windows and frames.
Date: Thu, 06 Sep 2012 16:42:00 +0200 [thread overview]
Message-ID: <5048B638.7070706@gmx.at> (raw)
In-Reply-To: <5048739E.80005@yandex.ru>
>> > Hm. For example, killed buffers may sit in all_buffers for a while,
>> and
>> > still
>> > have from tens to thousands reachable objects per buffer (although
>> I didn't
>> > check whether these objects are reachable only from this dead buffer).
>>
>> Could you elaborate?
>
> Elaborate what?
Stefan answered that for me.
>> Marker objects belong to the buffer.
>
> Not all
Unless they point nowhere. Or what do you mean here?
> - make_window attaches two new markers to W->start and
> W->pointm; when W
> is set up to display the buffer B (set_window_buffer or maybe somewhere
> else),
> these markers are changed from 'point to nowhere' to 'point into B'.
Hence they belong to buffer B now.
>> The start and pointm fields are
>> regenerated from the saved window structure.
>
> Their member values are regenerated assuming that W->start and W->pointm
> itself
> are valid marker objects:
> Fset_window_configuration:
> ...
> else if (!NILP (BVAR (XBUFFER (p->buffer), name)))
> /* If saved buffer is alive, install it. */
> {
> wset_buffer (w, p->buffer);
> w->start_at_line_beg = !NILP (p->start_at_line_beg);
> set_marker_restricted (w->start, p->start, w->buffer); /* here */
> set_marker_restricted (w->pointm, p->pointm, /* and here */
> w->buffer);
> Fset_marker (BVAR (XBUFFER (w->buffer), mark),
> p->mark, w->buffer);
>
> This will throw an error if start/pointm aren't markers, or crash
> if they're invalid or uninitialized; if we can't trust the values
> stored in W's fields, we should use Fcopy_marker instead.
I miss you. Do you mean that
(let ((window (split-window)))
(set-window-buffer window (get-buffer-create "*foo*"))
(sit-for 1)
(save-window-excursion
(delete-window window)
(kill-buffer "*foo*")
(sit-for 1)))
should crash?
martin
next prev parent reply other threads:[~2012-09-06 14:42 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1T9II0-0005q4-Gh@vcs.savannah.gnu.org>
2012-09-05 18:24 ` [Emacs-diffs] /srv/bzr/emacs/trunk r109890: Do not mark objects from deleted buffers, windows and frames Stefan Monnier
2012-09-05 19:15 ` Stefan Monnier
2012-09-06 6:55 ` Dmitry Antipov
2012-09-06 7:00 ` Herring, Davis
2012-09-06 7:28 ` martin rudalics
2012-09-06 9:57 ` Dmitry Antipov
2012-09-06 14:42 ` martin rudalics [this message]
2012-09-06 12:53 ` Stefan Monnier
2012-09-06 14:42 ` martin rudalics
2012-09-06 12:52 ` Stefan Monnier
2012-09-06 14:42 ` martin rudalics
2012-09-06 17:33 ` Stefan Monnier
2012-09-07 9:52 ` martin rudalics
2012-09-06 17:06 ` Dmitry Antipov
2012-09-06 17:37 ` Stefan Monnier
2012-09-07 9:53 ` martin rudalics
2012-09-07 15:19 ` Stefan Monnier
2012-09-10 9:46 ` Reachable killed buffers [Was: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109890: Do not mark objects from deleted buffers, windows and frames] Dmitry Antipov
2012-09-10 13:25 ` Stefan Monnier
2012-09-10 15:15 ` Reachable killed buffers Dmitry Antipov
2012-09-10 20:15 ` Stefan Monnier
2012-09-10 21:10 ` Stefan Monnier
2012-09-11 5:25 ` Dmitry Antipov
2012-09-11 13:06 ` Stefan Monnier
2012-09-12 8:09 ` martin rudalics
2012-09-12 13:47 ` Paul Eggert
2012-09-12 13:59 ` Dmitry Antipov
2012-09-12 14:05 ` Paul Eggert
2012-09-12 14:15 ` martin rudalics
2012-09-12 15:59 ` Dmitry Antipov
2012-09-12 17:37 ` martin rudalics
2012-09-12 17:55 ` Paul Eggert
2012-09-13 3:29 ` Stefan Monnier
2012-09-13 4:43 ` Paul Eggert
2012-09-13 5:00 ` Dmitry Antipov
2012-09-13 5:18 ` Paul Eggert
2012-09-13 12:47 ` Stefan Monnier
2012-09-13 16:49 ` martin rudalics
2012-09-13 17:11 ` Paul Eggert
2012-09-13 17:30 ` martin rudalics
2012-09-14 12:10 ` Dmitry Antipov
2012-09-14 13:29 ` Stefan Monnier
2012-09-14 13:38 ` martin rudalics
2012-09-13 18:01 ` Dmitry Antipov
2012-09-06 7:20 ` [Emacs-diffs] /srv/bzr/emacs/trunk r109890: Do not mark objects from deleted buffers, windows and frames martin rudalics
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5048B638.7070706@gmx.at \
--to=rudalics@gmx.at \
--cc=dmantipov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).