From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Dan Nicolaescu <dann@gnu.org>,
Emacs development discussions <emacs-devel@gnu.org>
Subject: Re: Pseudovectors initialization
Date: Wed, 27 Jun 2012 17:22:49 -0400 [thread overview]
Message-ID: <jwv8vf830yz.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <4FEB422C.7070803@yandex.ru> (Dmitry Antipov's message of "Wed, 27 Jun 2012 21:26:04 +0400")
>> Is removing this, or removing anything that is set to Qnil safe?
>> It might be from case to case, but it's not obvious...
> It's verified to be safe for windows, frames, processes and terminals.
> ALLOCATE_PSEUDOVECTOR evaluates how many Lisp_Objects are located
> after vectorlike_header, and then calls allocate_pseudovector to
> initialize all of them to Qnil. Next, allocate_{window,frame,process,
> terminal} zeroes the rest. Thus, you need to initialize Lisp_Object
> slot only if it should be non-nil and other slot only if it should
> be non-zero.
There's another exception: slots which are of type Lisp_Object but are
not traced normally by the GC (i.e. are placed in the "non-Lisp" part of the
pseudo-vector). They're rare, tho (maybe the buffer's undo-log is one
of them).
Stefan
next prev parent reply other threads:[~2012-06-27 21:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-26 7:26 Pseudovectors initialization Dmitry Antipov
2012-06-26 9:17 ` John Wiegley
2012-06-26 11:02 ` Dmitry Antipov
2012-06-26 12:33 ` Michael Welsh Duggan
2012-06-26 13:07 ` Dmitry Antipov
2012-06-26 13:15 ` Stefan Monnier
2012-06-26 13:52 ` Nix
2012-06-27 17:04 ` Dan Nicolaescu
2012-06-27 17:26 ` Dmitry Antipov
2012-06-27 21:22 ` Stefan Monnier [this message]
2012-06-27 21:31 ` Andreas Schwab
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=jwv8vf830yz.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=dann@gnu.org \
--cc=dmantipov@yandex.ru \
--cc=emacs-devel@gnu.org \
/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).