1mincore(2) System Calls mincore(2)
2
3
4
6 mincore - determine residency of memory pages
7
9 #include <sys/types.h>
10
11 int mincore(caddr_t addr, size_t len, char *vec);
12
13
15 The mincore() function determines the residency of the memory pages in
16 the address space covered by mappings in the range [addr, addr + len].
17 The status is returned as a character-per-page in the character array
18 referenced by *vec (which the system assumes to be large enough to
19 encompass all the pages in the address range). The least significant
20 bit of each character is set to 1 to indicate that the referenced page
21 is in primary memory, and to 0 to indicate that it is not. The settings
22 of other bits in each character are undefined and may contain other
23 information in future implementations.
24
25
26 Because the status of a page can change between the time mincore()
27 checks and returns the information, returned information might be out‐
28 dated. Only locked pages are guaranteed to remain in memory; see
29 mlock(3C).
30
32 Upon successful completion, mincore() returns 0. Otherwise, −1 is
33 returned and errno is set to indicate the error.
34
36 The mincore() function will fail if:
37
38 EFAULT The vec argument points to an illegal address.
39
40
41 EINVAL The addr argument is not a multiple of the page size as
42 returned by sysconf(3C), or the len argument has a value
43 less than or equal to 0.
44
45
46 ENOMEM Addresses in the range [addr, addr + len] are invalid for the
47 address space of a process or specify one or more pages which
48 are not mapped.
49
50
52 mmap(2), mlock(3C), sysconf(3C)
53
54
55
56SunOS 5.11 12 Aug 1990 mincore(2)