I made a Vector for large amounts of data, that does not copy when growing, by using full mmap'd pages.

100 points wonkoderverstaendige

https://github.com/wonkodv/large-vector

LVec::push will never copy and is truly O(1) (ignoring the OS's page table maintenance) but uses full memory pages, so it rounds up to the next full 4kb. If the capacity is exhausted, the OS will either give us more memory pages at the same address, or tell us a new virtual address, without ever copying data in physical memory.

Is this useful?

I guess someone else has already done something like this, do you have a link?