[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: static variables with scheme objects
From: |
Paul Jarc |
Subject: |
Re: static variables with scheme objects |
Date: |
Wed, 16 Jul 2003 15:49:43 -0400 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) |
sig <address@hidden> wrote:
> global_list =
> scm_permanent_object(scm_list_2(make_giant_smob1(),
> make_giant_smob2()));
>
> make_giant_smob2() runs and creates a smob. Then
> make_giant_smob1() runs and it doesn't have enough memory to
> create it, so it runs the gc, which finds smob2 without
> references,
At this point, smob2 is referenced from the C stack, I think. It's
only after init() completes that the static variable is the only
reference. And if I'm right about that, then on second thought, even
another concurrent thread won't cause trouble. I think.
paul