At 11:05 PM +0200 5/18/02, Peter Gibbs wrote: >The COW patch has been revised for minimal impact to the outside world. >The only files changed are: resources.h, resources.c, string.h, string.c >There is one API change: Parrot_reallocate_string has an additional >parameter. However, nobody outside string.c really has any business calling >that anyway; and currently nobody else does. > >The STRING structure has one change: a new field, void *buffer, points to >the start of the physical buffer allocation. >I tested a version that eliminated this requirement, by placing the >allocated buffer length in the string tail; but this made the code in >compact_string_pool very cumbersome, and the performance was several percent >slower than my current implementation.
I've been thinking about strings and COW. COW is likely to be a big enough win to justify the extra space in string headers for a start of string in addition to a start of buffer, and since the only things that care about it live in string.c, that's fine. So go ahead--I expect it may make COW a bit easier. >Once the latest memory management patch is in, I will resync and submit the >COW code as a separate patch, and we'll see what everybody thinks about it. Did we get you commit privs? If so, commit it. If not, get me your perl.org login and I'll get it taken care of. >Unrelated subject: I see that Steve has modified string.c to get around the >problem with the temporary transcoded strings - I believe we need to >finalise a standard way of handling these situations soon. If anybody is >interested, I will resync my previous 'neonate' patch - it needs a bit of >work to fit with the latest changes to resources.c Did we get the "temporarily alive" bit patch in? If not, lets do that for now. -- Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk