collector
* Parrot_(re)allocate_string changed to add the tail for non-constant
strings
* Parrot_reallocate_string now takes an additional parameter to specify the
flags required for the new buffer
* compact_string_pool handles COW strings appropriately; the logic caters
for both full strings
At 4:14 PM + 5/21/02, Peter Gibbs (via RT) wrote:
* New field 'buffer' in STRING points to the start of the allocated buffer.
I have put this field immediately after the Buffer fields, in case we want
to create a generic subclass of Buffer with the same functionality
* The existing 'bufstart'
on altogether too much
mail) Since we're putting the COW stuff at the tail end, substrings
of COW strings are fine. You set the bufstart to where the substring
starts, buflen set so it goes to the end of the original buffer, and
the string length bit holds the real string length. That way you
start where you
***
Actually, we don't. (Sez the man catching up on altogether too much
mail) Since we're putting the COW stuff at the tail end, substrings
of COW strings are fine. You set the bufstart to where the substring
starts, buflen set so it goes to the end of the original buffer, and
the string length
to the data in a STRING must use the new strstart
pointer
instead of bufstart ***
Actually, we don't. (Sez the man catching up on altogether too much
mail) Since we're putting the COW stuff at the tail end, substrings
of COW strings are fine. You set the bufstart to where the substring
starts, buflen
a major interface change:
*** All references to the data in a STRING must use the new strstart
pointer
instead of bufstart ***
Actually, we don't. (Sez the man catching up on altogether too much
mail) Since we're putting the COW stuff at the tail end, substrings
of COW strings
Actually, we don't. (Sez the man catching up on altogether too much
mail) Since we're putting the COW stuff at the tail end, substrings
of COW strings are fine. You set the bufstart to where the substring
starts, buflen set so it goes to the end of the original buffer, and
the string length
At 3:09 PM -0400 5/21/02, Mike Lambert wrote:
But I think the strstart is a better idea regardless. It's what perl5 did
anyway, isn't it?
That's not necessarily an endorsement of an idea as good... :)
--
Dan
--it's
Implementing COW is a bit harder, although now that we have a DOD pass, a
lot easier. We can update counts in there...it's just not very easy to see
how we're going to keep track of refcounts.
I made two assumptions for my test implementation of COW strings:
1) we need to be able to share
I made two assumptions for my test implementation of COW strings:
Wow, you already have a COW implementation? Great to hear!
1) we need to be able to share substrings as well as complete strings
2) COW must survive garbage collection
Without these two, I believe the overhead probably
2) COW must survive garbage collection
COW can in certain cases, *not* survive garbage collection, specifically
The simplest possible implementation of COW strings would be to let the
garbage collector 'undo' the COW nature i.e. make multiple copies of all
shared buffers. All I meant
11 matches
Mail list logo