munmap(2) System Calls Manual munmap(2)Name
munmap - unmaps memory of a character device
Syntax
#include <sys/types.h>
#include <sys/mman.h>
caddr_t munmap(addr, len)
caddr_t addr;
size_t len;
Arguments
addr Specifies the address space of the calling process at which the unmapping begins.
len Specifies the number of bytes to unmap.
Description
The system call unmaps a specified number of bytes (len) starting at a specified address (addr) from the address space of the calling
process. You mapped this device in a previous call to Subsequent access to the unmapped region results in a signal. You cannot unmap
data, stack, and text segments using
The system call rounds len to the nearest multiple of page size as returned by
The range [addr, addr + len] may contain more than one mapped region created by In this case, unmaps all of the mapped regions.
Restrictions
All of the mapped regions must be wholly contained in the range [addr, addr + len]. That is, addr must be the beginning of some mapped
region and addr + len must be the end of some (possibly different) mapped region.
Return Value
If successful, returns 0. Otherwise, it returns -1 and sets the errno argument to one of the errors listed in the Diagnostics section.
Diagnostics
The call to fails if one or more of the following is true:
[EINVAL] The address you specified in addr is not a multiple of the page size as returned by
[EINVAL] The addresses in the range [addr, addr + len] are not valid in the process address space.
[EINVAL] All of the segments being unmapped are not entirely contained in the range [addr, addr + len].
See Alsogetpagesize(2), getsysinfo(2), mmap(2)munmap(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)
I am trying to map the information from the gensyms command, Its gives information about the various symbols info like symbol type, addr offset, and the main libraries addr starting point. My problem is , how do I map this 32 bit addr to a 64 bit addr, I am trying to extract Segment # information... (0 Replies)
Hello Gurus,
I got a system reboot due to "unix: BAD TRAP: type=30 rp=2a10001b840 addr=2a000012040 mmu_fsr=0" on SUNW,Netra-CP2300. I guess it is caused by HW fault but not very sure, and don't know which part should be relaced incase it is HW reason really. Sincerely appreciate for your... (7 Replies)
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)
Here's my code.
21 if ; then
22
23 ls addr*.tmp | while IFS= read -r entry; do # Starts Reading .cfg files one by one ...
24 echo $entry
I get the below error at line number 21
line 21:
Can you tell me how can i alter my code to avoid the error ? (3 Replies)