[plt-scheme] Are web cells space-safe?

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Fri Mar 23 05:22:21 EDT 2007

Hey Alessandro,

On 3/22/07, Alessandro Colomba <acolomba at gmail.com> wrote:
> I would like to confirm that I have a correct understanding of the
> space properties of web cells. Right now, from reading the paper and
> studying PLT's implementation, I suspect that they allocate space
> linearly with the length of the direct navigation path from the first
> to the most current continuation.

Yes, that's right.

> In particular, I understand that frames in this path are never
> dereferenced and garbage collected. In fact, I can see this should not
> never happen since a continuation may hold a cell which received its
> last value many frames before.

That's not exactly true. When a continuation is reaped, then the
parent frame of the child frame that would be created for it has one
less live path to it. So, eventually the frames are garbaged collected
as continuations expire. But, if you go with the mindset that
continuations cannot be GC'd (because there may always be roots that
point to them, i.e., users bookmarks and brains) then the frames don't
GC either.

> The only way I could see frames being dereferenced without breaking
> the program would be if cells belonging to a frame soon to be
> destroyed were propagated to the immediate child frames (excluding
> cells that exist there already).

Something like that might make sense, or some sort of dynamic "empty"
frame optimization, but I'm not sure. In the PLT server, the above
strategy doesn't end up costing much more.

Hope this helps,


Jay McCarthy <jay.mccarthy at gmail.com>

Posted on the users mailing list.