emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Code inspection: W32 specific problems


From: Stefan Monnier
Subject: Re: Code inspection: W32 specific problems
Date: Tue, 12 Jul 2005 18:28:57 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]