> Efficiency: Uses a lazy-loading piece tree to avoid loading huge files into RAM I once started writing a text editor on Linux, and first went down a similar route: a piece table over a mmap()'d file. But I abandoned using mmap, because Linux file systems typically don't have mandatory locking enabled, so you can't be sure that the file data won't be modified by another program. (Then I got bogged down in Unicode ha…
So I opted for explicit management of chunks, also gives me more control and consistent cross platform behavior.