4 ms·
That's interesting, but wouldn't that require each vector to take up a minimum of a page of memory? I mean, I guess you can put them near the end of pages alre
by asvitkine 3y ago
That's interesting, but wouldn't that require each vector to take up a minimum of a page of memory?
I mean, I guess you can put them near the end of pages already occupied by other things, though then you need more knowledge/control of other memory allocations in the program...
- mike_hock 3y agoIt would be possible to get small capacities from malloc and then switch to mmap once the capacity has grown to page size and try to extend the mapping with MAP_FIXED_NOREPLACE. The downside is that if the mapping can't be contiguously extended, it's a wasted syscall, but I can't imagine that it wouldn't be worth it in a 48-bit "64-bit" address space.