Currently there are two copy-on-write implementations in the core, enabled by the PERL_OLD_COPY_ON_WRITE and PERL_NEW_COPY_ON_WRITE macros. The old one was originally called called PERL_COPY_ON_WRITE, but was renamed to PERL_OLD_COPY_ON_WRITE in 2005, and was never enabled by default; while PERL_NEW_COPY_ON_WRITE was added for 5.18.0 and enabled by default in 5.20.0. The old one was Nicholas's baby (IIRC), and did its sharing by using the IV field of a PVIV to hold a circle of pointers to the SVs that share the same PV buffer; while the new one is FC's, and uses a spare byte in the PV buffer itself to hold a ref count. The code in places in sv.c etc is currently very messy, with a lot of stuff like #ifdef PERL_OLD_COPY_ON_WRITE ... #elif defined(PERL_NEW_COPY_ON_WRITE) ... else ... #endif I don't know whether the PERL_OLD_COPY_ON_WRITE code even works any more. I propose that we strip all the PERL_OLD_COPY_ON_WRITE chunks from the core. -- I thought I was wrong once, but I was mistaken.Thread Next