At 5:38 PM +0200 5/10/02, Peter Gibbs wrote: >The result is that the last header of a COWed string will still believe that >the buffer is shared until a GC collection run occurs, and therefore could >result in buffers being copied unnecessarily. Your system eliminates this >problem; however, I believe that Dan may be averse to using a linked list - >we'll see.
As long as there's no externally visible signs of the COW stuff, I don't care as long as the code's commented well enough to be maintained. I'd prefer commits of the code to be done only when there's a demonstrable win to the committed code, though. (Which is to say "No checking in code that slows things down") If you want to take an intermediate step, it's fine to mark substrings that don't start at the beginning of a buffer with an extra flag of some sort (BUFFER_COW_substring_FLAG or something) that caused the GC system to make a clean copy when it ran through the buffer pool and collected, though that has issues of properly gaguing how much memory's needed for the new pool. -- Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk