Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mmap(2)

MINCORE(2)  —  SYSTEM CALLS

NAME

mincore − determine residency of memory pages

SYNOPSIS

mincore(addr, len, vec)
caddr_t addr; int len; result char ∗vec;

DESCRIPTION

mincore() returns the primary memory residency status of pages in the address space covered by mappings in the range [addr, addr + len).  The status is returned as a char-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, 0 if it is not.  The settings of other bits in each character is undefined and may contain other information in the future. 

RETURN VALUE

mincore() returns 0 on success, −1 on failure. 

ERRORS

mincore() will fail if:

EFAULT ∗vec includes an out-of-range or otherwise inaccessible address. 

EINVAL addr is not a multiple of the page size as returned by getpagesize(2). 

ENOMEM Addresses in the range [addr, addr + len) are invalid for the address space of a process, or specify one or more pages which are not mapped.

SEE ALSO

mmap(2)

Sun Release 4.0  —  Last change: 22 March 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026