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

Re: continuations and threads



> >> Sure, but I don't think SML/NJ actually *detects* that it's still
> >> relevant.  (The GC could, I guess.)  This means that the retained C
> >> frame may still keep data alive which is really dead.  This might
> >> create a space leak.
> 
> Jim> Roland did this work for Olin Shivers' group at MIT; I don't know if
> Jim> it has made it into the main distribution.  But that's correct --- you
> Jim> need the GC to tell you when KS2 is garbage, and thus C2 can be
> Jim> destroyed.
> 
> And does Roland's implementation do that?  I imagine this being pretty
> hard to do, especially if the GC is written in C: you want to remove C
> frames *underneath* the current one without affection the ongoing
> evaluation.

I'm sorry --- you'll have to explain the scenario you have in mind in
more detail.

The specific action you propose never takes place, because it violates
this rule, which I quoted before:

- When we destroy a C frame, all younger C frames must also be destroyed.

Can you describe a situation where this needs to happen?