Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mvalid(2) [osf1 man page]

mvalid(2)							System Calls Manual							 mvalid(2)

NAME
mvalid - Checks memory region for validity SYNOPSIS
#include <sys/types.h> #include <sys/mman.h> int mvalid ( caddr_t addr, size_t len, int prot ); PARAMETERS
Specifies the address of the region whose validity is to be checked. Specifies length in bytes of the region specified by the addr parame- ter. Specifies the desired access protection for the region. DESCRIPTION
The mvalid() function checks the validity of a memory region. A region is considered to be valid if accesses of the requested type are allowed to all addresses in the region. The sys/mman.h header file defines the following access options: The mapped region can be read. The mapped region can be written. The mapped region can be executed. The prot parameter can be any combination of PROT_READ, PROT_WRITE, and PROT_EXEC ORed together. RETURN VALUES
The mvalid() function returns 0 (zero) if accesses requiring the specified protection are allowed to all addresses within the specified range of addresses. Otherwise, the mvalid() function returns -1 and sets errno to indicate the error. ERRORS
If the mvalid() function fails, errno may be set to one of the following values: The range specified by [addr, addr + len) is invalid for the process' address space, or the range specifies one or more unmapped pages, or one or more pages of the range disallows accesses of the specified protection. The prot parameter is invalid, or the addr parameter is not a multiple of the page size as returned by sysconf(_SC_PAGE_SIZE). RELATED INFORMATION
Functions: mmap(2), mprotect(2), sysconf(3) delim off mvalid(2)

Check Out this Related Man Page

munmap(2)							System Calls Manual							 munmap(2)

NAME
munmap - Unmaps a mapped region SYNOPSIS
#include <sys/mman.h> int munmap ( void *addr, size_t len ); [Tru64 UNIX] The following definition of the munmap() function does not conform to current standards and is supported only for backward compatibility (see standards(5)): #include <sys/mman.h> int munmap ( caddr_t addr, size_t len ); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: munmap(): XSH5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Specifies the address of the region to be unmapped. Specifies the length in bytes of the region to be unmapped. DESCRIPTION
The munmap() function unmaps a mapped file or shared memory region. The addr and len parameters specify the address and length in bytes, respectively, of the region to be unmapped. The len parameter must be a multiple of the page size as returned by sysconf(_SC_PAGE_SIZE). If len is not a multiple of the page size as returned by sysconf(_SC_PAGE_SIZE), the length of the region will be rounded up to the next multiple of the page size. The result of using an address which lies in an unmapped region and not in any subsequently mapped region is undefined. RETURN VALUES
Upon successful completion, the munmap() function returns 0 (zero). Otherwise, munmap() returns -1 and sets errno to indicate the error. ERRORS
If the munmap() function fails, errno may be set to one of the following values: The range [addr, addr + len) includes an invalid address. The addr parameter is not a multiple of the page size as returned by sysconf(_SC_PAGE_SIZE). The len parameter is 0 (zero). RELATED INFORMATION
Functions: mmap(2), sysconf(3) Standards: standards(5) delim off munmap(2)
Man Page

2 More Discussions You Might Find Interesting

1. Linux

f prot

(1 Reply)
Discussion started by: mallicksaran
1 Replies

2. Shell Programming and Scripting

mapped reads using samtools flagstat options

Hey guys, Does anyone know how to calculate total number of mapped reads for a certain region of a bam file using samtools flagstat? I know to use flagstat for the whole bam file. but for a specific region of it... is there an option? Tnx ---------- Post updated at 12:27 PM ----------... (1 Reply)
Discussion started by: @man
1 Replies