The mincore() function determines the residency of the memory pages in the address space covered by mappings in the range [addr, addr
+ len]. The status is returned as a character-per-page in the character array referenced by *vec (which the system assumes to be large enough to encompass all
the pages in the address range). The least significant bit of each character is set to 1 to indicate that the referenced page is in primary memory, and to 0 to indicate that it is not. The settings of other
bits in each character are undefined and may contain other information in future implementations.
Because the status of a page can change between the time mincore() checks and returns the information, returned information might be outdated. Only locked pages are guaranteed to
remain in memory; see mlock(3C).
|