guile-devel
[Top][All Lists]
Advanced

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

Re: A warning for Scheme implementations that derived the Garbage Collec


From: Aubrey Jaffer
Subject: Re: A warning for Scheme implementations that derived the Garbage Collector from SIOD
Date: Sat, 14 Jul 2001 22:10:37 -0400 (EDT)

 | From: Neil Jerram <address@hidden>
 | Date: 14 Jul 2001 19:05:19 +0100
 | 
 | [moved from bug-guile to guile-devel, since this isn't an immediate
 | problem]
 | 
 | >>>>> "Aubrey" == Aubrey Jaffer <address@hidden> writes:
 | 
 |     Aubrey> SCM has supported both of these architectures for years.
 |     Aubrey> The problem on the SPARC (which manifests as bloated
 |     Aubrey> memory only when using many saved continuations) is not
 |     Aubrey> that of finding all references, but of pre-clearing them.
 |     Aubrey> I am sure some SPARC maven at Sun could tell us how to
 |     Aubrey> clear the register windows; anyone know one?
 | 
 | I'm not sure I've understood the question, but is the answer anything
 | to do with this comment from Guile's __scm.h?
 | 
 | ------------- __scm.h --------------
 | /* James Clark came up with this neat one instruction fix for
 |  * continuations on the SPARC.  It flushes the register windows so
 |  * that all the state of the process is contained in the stack. 
 |  */
 | 
 | #ifdef sparc
 | # define SCM_FLUSH_REGISTER_WINDOWS asm("ta 3")
 | #else
 | # define SCM_FLUSH_REGISTER_WINDOWS /* empty */
 | #endif
 | ------------- __scm.h --------------

"ta 3" is the piece George seems to be missing.  It makes all of the
registers readable.  But what is the lifetime of pointers in those
registers?  Apparently forever -- if a pointer is passed as a high
numbered argument but subsequent execution doesn't write that register,
then that pointer remains and is marked at every GC, hence never
collected.

If we were able to clear a register window when popping the stack, then
we could eliminate these stale pointers.



reply via email to

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