develooper Front page | perl.perl6.internals | Postings from December 2001

Re: Large string patch

Thread Previous | Thread Next
Dan Sugalski
December 30, 2001 10:08
Re: Large string patch
Message ID:
At 07:30 AM 12/30/2001 -1000, David & Lisa Jacobs wrote:

>From: "Dan Sugalski" <>
> > At 08:33 PM 12/29/2001 -1000, David & Lisa Jacobs wrote:
> > GC will manage all the memory. Everything managed should either be hung
> > a PMC or an internal structure. (There are GC hooks in the vtable for
> > complex things)
>So does that mean I can get rid of passing around the interpreter?

Sort of. Memory and structure (pmc header & string header) allocation must 
be from interpreter-local pools. There's a patch to use TLS for the 
interpreter pointer rather than passing it as an argument--I've pretty much 
decided it's The Way To Go, so I'm going to dig it out and apply it.

So you still need the interpreter pointer, you just don't have to pass it.

> > 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:
>Now that I have memory allocation for the STRING down to a single location,
>it is very easy for me to make it a pointer again and create two
>allocations.  Would you like me to do that and submit the patch.

Yep, please.


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

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About