Optimizations in rBcda15408582e8de5b405 do not guarantee anymore that consecutive memchunks in two consecutive undo steps are actually about the same data (and hence can share the same buffer when unchanged). This buffer sharing can now happen without any particular order, so we need to change the process when 'merging' two undo memfiles together. Note that existing code was not logically correct either, even with previous undo storage code, since it would blindly transfer ownership of the buffer to the second memchunk, without checking whether the first one was actually the owner of it or not (a same buffer can be shared by matching memchunks in many consecutive memfiles/undo steps).
8.4 KiB
8.4 KiB