unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org, "Kim F. Storm" <storm@cua.dk>
Subject: Re: Code inspection: W32 specific problems
Date: Tue, 12 Jul 2005 18:28:57 -0400	[thread overview]
Message-ID: <87k6jvpsq5.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <uackrn94r.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 12 Jul 2005 21:59:16 +0300")

> Can please you remind the rules for what variables need staticpro?

All static/global variables of type Lisp_Object.
The `staticpro' simply adds the variable to the list of root pointers for
the GC, so if the staticpro is missing, the GC may accidentally collect the
object, even though it's live.

If you want to live dangerously, you can try to argue in some corner cases
that a staticpro is not necessary by showing that in all possible cases,
the object stored in the variable is either non-allocated (e.g. a fixnum),
or will always be reachable via some other way (which the GC will use to
detect that the object is live).

I hope nobody here wants to live dangerously, since in this case it's a lot
more trouble than it's worth.


        Stefan

  reply	other threads:[~2005-07-12 22:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-12 12:44 Code inspection: W32 specific problems Kim F. Storm
2005-07-12 18:59 ` Eli Zaretskii
2005-07-12 22:28   ` Stefan Monnier [this message]
2005-07-13  8:10     ` Kim F. Storm
2005-07-16 11:32 ` Eli Zaretskii
2005-07-16 17:16   ` David Hunter
2005-07-18 12:29     ` Kim F. Storm
2005-07-19  1:02       ` David Hunter
2005-07-19  8:51         ` Kim F. Storm
2005-07-19  3:37       ` Eli Zaretskii
2005-07-19  8:55         ` Kim F. Storm
2005-07-19 17:14           ` Eli Zaretskii

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=87k6jvpsq5.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=storm@cua.dk \
    /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).