At 08:33 PM 12/29/2001 -1000, David & Lisa Jacobs wrote:
> >From what I could tell, it looks like Dan put it in there as a potential GC
>hook when allocating the header of a string or PMC (see resources.c).  My
>guess is that he is planning to fire off the GC from the interpreter.
>
>If that is the case and we need it back, let me know and I'll restore it.
>
>Has the scope of the GC been determined yet?  By this I mean will it only be
>managing PMC and STRING objects or will be used for all memory allocations?

GC will manage all the memory. Everything managed should either be hung off 
a PMC or an internal structure. (There are GC hooks in the vtable for 
complex things)

The bigger issue is:

>The biggest thing that might cause heartburn is that I made the string
>structure and string buffer a single memory block.

I want the string and memory to be separate if we can at all manage it. 
Imagine, for example, this:

   @foo = <BAR>;

In which case we could mmap the file in, allocate a honkin' big chunk of 
string headers, and point into our mmapped buffer.

It also makes COW buffers tough, since you can't have multiple string 
buffers pointing at the same memory. And if you need to realloc then *all* 
the places that have a pointer to the string need to be updated, rather 
than just the string buffer's pointer.

                                        Dan

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

Reply via email to