From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: More over-engineering
Date: Fri, 27 Nov 2015 12:00:23 -0500 [thread overview]
Message-ID: <jwvh9k7tme8.fsf-monnier+emacs@gnu.org> (raw)
What's up with allocate_emacs_value in emacs-modules.c?
Are we really allocating a structure for every Lisp_Object value we pass
through the modules API? Why do that?
The GC will find all Lisp_Object values that are stored in other Lisp
object or on the stack, so there are rather few remaining cases where
a Lisp_Object value has to be protected from GC. For those remaining
cases, we do want to provide a way for the C code to "pin" the object
(we call it "gc-protect" them in Emacs's C code), but looking at the
emacs-modules.c is looks like we don't even do that because those
emacs_value objects are auto-reclaimed when upon return, so they only
"protect" data whose lifetime doesn't escape the current module call
(and most of those cases correspond to having a Lisp_Object on the
stack, so there's no need for GC protection anyway).
Stefan
next reply other threads:[~2015-11-27 17:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-27 17:00 Stefan Monnier [this message]
2015-11-27 17:12 ` More over-engineering Aurélien Aptel
2015-11-27 17:37 ` David Kastrup
2015-11-27 18:02 ` Stefan Monnier
2015-11-27 18:19 ` Eli Zaretskii
2015-11-27 18:53 ` Stefan Monnier
2015-11-27 19:32 ` Eli Zaretskii
2015-11-27 21:55 ` Stefan Monnier
2015-11-28 7:51 ` Eli Zaretskii
2015-11-28 16:22 ` Stefan Monnier
2015-11-28 16:34 ` Eli Zaretskii
2015-11-28 23:13 ` Paul Eggert
2015-11-30 19:40 ` Stefan Monnier
2015-11-30 20:04 ` Eli Zaretskii
2015-11-30 20:39 ` Stefan Monnier
2015-11-30 20:49 ` Eli Zaretskii
2015-12-06 21:16 ` Paul Eggert
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=jwvh9k7tme8.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--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 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.