Copyright (c) 1991, 1993 The Regents of the University of California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following...
NAMEmincore - determine residency of memory pages
SYNOPSISIn sys/mman.h Ft int Fn mincore const void *addr size_t len char *vec
DESCRIPTIONThe Fn mincore system call determines whether each of the pages in the region beginning at Fa addr and continuing for Fa len bytes is resident. The status is returned in the Fa vec array, one character per page. Each character is either 0 if the page is not resident, or a combination of the following flags (defined in In sys/mman.h ) :
- Page is in core (resident).
- Page has been referenced by us.
- Page has been modified by us.
- Page has been referenced.
- Page has been modified.
- Page is part of a "super" page. (only i386 & amd64)
The information returned by Fn mincore may be out of date by the time the system call returns. The only way to ensure that a page is resident is to lock it into memory with the mlock(2) system call.
RETURN VALUESRv -std mincore
ERRORSThe Fn mincore system call will fail if:
- Bq Er ENOMEM
- The virtual address range specified by the Fa addr and Fa len arguments is not fully mapped.
- Bq Er EFAULT
- The Fa vec argument points to an illegal address.