At 09:13 AM 11/7/2001 +0100, Benoit Cerrina wrote:
>From: "Dan Sugalski" <[EMAIL PROTECTED]>
>
> > 'Kay, here's a quick overview of how memory, garbage collection, and dead
> > object detection are going to work in Parrot. (And I appreciate this
> > getting raised now, BTW--both because it's about time and because it makes
> > me think about it in time for next saturday)
> >
> > There are three sets of memory pools for each interpreter. They are:
> >
> > *) The PMC pool
> > *) The Buffer header pool
> > *) The honking great slab of memory pool
> >
> > The PMC and buffer pools each consist of one or more arenas, while the
> > HGSOM pool has one or more slabs of memory allocated to it.
> >
> > Each arena is thread-private, and no other interpreter can allocate out of
>it.
><snip>
>just to make sure I understand: you want to use a mark and sweep collector
>on the PMC, the only special twist being that you don't actually free the 
>PMC but just mark them as dead and only free the data they point in the 
>buffer zone. OK.

Yes. That way we get more deterministic destruction of objects with cleanup 
handlers attached to them, without having to commit to compacting the heap 
every time we go looking for dead PMCs with DESTROY methods.

>Question:
>     how do you identify the type of stuff pointed to by the PMC's, you said
>we could have a PMC which has a buffer of (pointers to) PMC's, this will 
>need to be clearly marked for the gc. How do you plan on doing this?

Magic. :)

Seriously, I expect we'll co-opt some bits in the PMC's flag area for this.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to