[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: out-of-order GC
From: |
Neil Jerram |
Subject: |
Re: out-of-order GC |
Date: |
01 Jan 2003 17:58:06 +0000 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
>>>>> "Egil" == Egil Moeller <address@hidden> writes:
Egil> Aha, so that's how it should be done. Is it the pointer (on
Egil> the resource SMOB), or the diplay SMOB itself that is
Egil> marked?
The display SMOB (i.e. the SMOB cells on the heap).
Egil> And in the latter cae, what if the space has
Egil> allready been reused, or can't that happend?
If I understand correctly, this whole scenario is only difficult if
both "resource" and "display" SMOBs are GC'd in the same GC cycle. So
it isn't possible that the cells used for the display SMOB are already
being reused.
(I think; it would be good if a GC expert could check my logic here.)
Egil> And what is the
Egil> name of the C function to check the pointer for what type it
Egil> is?
There isn't a function. My code does this:
if ((SCM_TYP16 (win->dsp) == scm_tc16_xdisplay) &&
...)
scm_x_destroy_window_x (window);
If it followed the pattern in most of libguile, it should instead be:
#define SCM_XDISPLAYP(x) SCM_TYP16_PREDICATE (scm_tc16_xdisplay, x)
if (SCM_XDISPLAYP (win->dsp) &&
...)
scm_x_destroy_window_x (window);
Regards,
Neil