emacs-devel
[Top][All Lists]
Advanced

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

Re: GC crashes


From: Stefan Monnier
Subject: Re: GC crashes
Date: 07 Dec 2003 21:52:11 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>> No, it just means we have to change init_fns.
> Then, it seems that moving this:
>   Vweak_hash_tables = Qnil;
> to syms_of_fns is the easiest solution.

Sounds right.  And we should rename it as well because it's not
a lisp variable so it shouldn't start with `V'.

>> No, it shouldn't.  [ Side note: whether an integer should
>> be considered as "always live" or as "always GC-able" from
>> the point of view of weakness is not obvious. ]

> Ah!  I blindly believed that an integer is always GC-able,
> but survives_gc_p (obj) returns 1 if obj is an integer.  So
> if we make a composition hash table with :weak t, an element
> of the table always survives GC, thus is never removed.  It

That's right.

> doesn't fit my intuition but, I'd like to avoid discussing
> on it for the momemnt.

There's nothing useful to discuss indeed.  It's just interesting that it's
a case where the nice theory of "remove if GC-able" needs to be adjusted
for a particular case.  We could also decide that int does not
survive_gc_p, but it would be less useful.

> I'll try :weak `key' and check if it really works locally.
> It seems that we can't commit anything for a while anyway.

It shouldn't make any difference in practice.


        Stefan




reply via email to

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