Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Or have it evicted to swap. The kernel is pretty good at managing it automatically.


Writing garbage data you don't need anymore to disk (and reading it back for partial writes) is hardly an elegant solution.


It is elegant in the regard that the eviction only happens of page pressure warrants it. If the vector happens to be small enough, nothing special happens.

And you save on having to write some kind of allocator for it.


I'd say its a very elegant solution, it's a no code solution.


Static arrays of read-only memory-mapped files are the best vectors.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: