At 10:15 AM 7/3/2001 -0400, Uri Guttman wrote:
> >>>>> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes:
>
> DS> We're going to use a copying collector. When the string gets
> DS> copied as part of a compaction run things'll get cleaned up
> DS> appropriately. (Not that there's really any cleanup to do in that
> DS> case) Granted the destination string buffer will only be as big as
> DS> the source buffer 'really' is (which is to say the amount of
> DS> memory actually in the string plus the extra bit at the end, if
> DS> there is any) but that's fine.
>
>ok. i didn't realize the GC design was that far along. IIRC copying
>collectors need to have double the used space at all times to make a
>copy. is that ram tradeoff for speed? again IIRC copying is much simpler
>than mark/sweep but the ram does cost.
Copying collectors need a destination space as big as the source space, but
that doesn't mean you actually need twice as much RAM. You can collect in
pieces. (The original copying collectors did take up double the space, but
newer ones don't, essentially)
> DS> Nah, with a copying collector it's actually a little easier. The fewer
> DS> fields that need checking the faster things are.
>
>but you do have to copy and update all the active links. is this GC only
>for the data buffers and PMC's are in their own space? then you only
>have to copy the buffer and update 1 pointer in each PMC. that works for
>me.
There's only going to be one active link unless we get funky with COW at
the string data level, and I'd rather not.
FWIW, PMCs are in their own space, the string/bigint/bigfloat headers are
in their own space, and the string/bigint/bigfloat/random data buffers are
in their own space.
I think the prototype GC PDD details some of this.
http://www.sidhe.org/~dan/perl/gc.html. I need to abuse it some more, and
that's on the list once I get the opcode function PDD done. (Later today, I
think, work permitting)
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk