hexerator icon indicating copy to clipboard operation
hexerator copied to clipboard

mmap thoughts

Open crumblingstatue opened this issue 2 years ago • 0 comments

If it's possible to safely write back cowed regions: The changed regions must be written back exactly to avoid undefined behavior. So damage ranges should never cover more than they changed. No merging of damaged ranges with unchanged data inbetween. It should however be possible to merge ranges that are exactly next to each other, like when editing bytes one after another.

If it turns out it's necessary to copy changes to memory buffers separate from cow before saving, keep track of memory that would be needed, and warn user if memory needed would be too great to safely save.

crumblingstatue avatar Aug 16 '22 00:08 crumblingstatue