New utility: print number of resident pages for a file

The proposed name is 'fincore', analogous to 'mincore(2)' - the syscall
that reveals which pages are resident for a given address range.

The program maps the file into memory and calls mincore() on the range.
Only 4K pages are supported.

Bug: 929926
Change-Id: I943a3bdd00b90092348d1d0748f0dfbd9387d1db
Reviewed-by: Andrew Grieve <>
Reviewed-by: Benoit L <>
Commit-Queue: Egor Pasko <>
Auto-Submit: Egor Pasko <>
Cr-Original-Commit-Position: refs/heads/master@{#670076}
Cr-Mirrored-Commit: cb5e29e7b9be0024ca6b7943b08a35673224a7f4
3 files changed