Hacker News new | ask | show | jobs
by formerly_proven 2084 days ago
WILLNEED really just reads the entire file asynchronously into the page cache, at least on Linux.
2 comments

Is that still true if the size_t parameter to the madvise call is less than the entire file size? I would think that madvise hints could be issued at page granularity and not affect the entire mapping as originally allocated.
With no limit? What if the file is huge, will it evict other things in the cache?