mincore · shipping · also mincore(2)

mincore

mincore is a system call that reports a page-residency vector for a mapped virtual-address range.

Related Observatory article: mincore on hesela.com

Only the low bit of each result byte is defined. The start address must be page-aligned; length rounds up to pages. Success returns zero, failure returns -1 with errno, and the snapshot may already be stale on return. [1]

Linux v6.17 permits file-cache disclosure when the caller owns the inode, has the relevant capability, or passes the file write-permission check. Otherwise it returns all-one bytes for that mapping without measuring its residency. Opening a file read-only is not itself the deciding condition. [2]

Relations

related
page-cache, memory-mapped-file, posix-fadv-dontneed, rwf-nowait, readahead

Limitations

Citations

  1. Linux man-pages 6.19: mincore(2), residency snapshots and return values. (accessed 2026-10-17)
  2. Linux v6.17 mm/mincore.c: can_do_mincore, do_mincore and page-cache lookup. (accessed 2026-10-17)
  3. Hesela. Five self-owned-file mincore observations, source and environment. (accessed 2026-10-17)

JSON: /data/terms/mincore.json