munmap(2) System Calls Manual munmap(2)NAME
munmap - unmap pages of memory
SYNOPSIS DESCRIPTION
The function removes the mappings for pages in the range [addr, addr+len], rounding the len argument up to the next multiple of the page
size as returned by If addr is not the address of a mapping established by a prior call to the behavior is undefined. After a successful
call to and before any subsequent mapping of the unmapped pages, further references to these pages will result in the delivery of a or sig-
nal to the process.
If the specified address range was created by multiple calls to succeeds in unmapping all of the specified regions, provided they form a
contiguous address range.
If the region was created with the option, any modifications made to the region are discarded.
RETURN VALUE
Upon successful completion, returns Otherwise, it returns and sets to indicate the error.
ERRORS
The function will fails if:
[EINVAL] The addr argument is not a multiple of the page size as returned by
[EINVAL] Addresses in the range [addr, addr+len], are outside the valid range for the address space of a process.
[EINVAL] The address range specified by addr and len was not created by a successful call to
[EINVAL] The len argument is
AUTHOR
was developed by HP, AT&T, and OSF.
SEE ALSO mmap(2), sysconf(2), <signal.h>, <sys/mman.h>.
STANDARDS CONFORMANCE CHANGE HISTORY
First released in Issue 4, Version 2.
munmap(2)
Check Out this Related Man Page
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)
Hi all,
I would like to use properly an input pipe, like this :
cat myFile.txt | myCommand.shI always find this solution :
while read line; do ...; donebut I have a great lost of performance !
On a big file, with a simple grep, I can spend 2400 times more time ! oO
(from 0,023sec to 1m)... (4 Replies)
Suppose I have a main() function with only one malloc statement allocating say some 1 gb memory. Also say my system has 1 gb of ram.
main()
{
malloc(1gb)
return(0)
}
The program above exits without freeing the memory.
In this case will the 1 gb of heap memory be returned... (9 Replies)
Hi all,
I'm quite new to Solaris and I've been searching around everywhere to try and find the root of my Oracle DB install problem. It quits immediately when it runs isainfo when it gets a return of 3md64. To me this looks like there is a typo where ever isainfo pulls it's info from, but I... (13 Replies)
Hello all,
I have read just about every rpcbind not starting thread and article on the internet it seems, but I have not found a solution to my problem as of yet. I have a solaris 10 server that has been running with no problems for a while. The other day it crashed and would not boot to the gui... (2 Replies)
I keep getting a Illegal instruction error when running my MCP file below is the dump error message followed by truss log, dose anyone have any ideas?
/opt/builds/bin/core: ELF 32-bit MSB core file SPARC Version 1, from 'mcp'
*** Select Close or Exit from the window menu to close this window... (12 Replies)
Hi all, Hope everyone doing good.
Let me come to point, i have setup-ed a LDAP server and client machines
Server works perfect, while make a search from client machine it too get the Query from LDAP server, But while i switch user it says user not exists
# su - babin
su: user babin does... (3 Replies)
There is backup client software on Solaris-10. I wanted to restart that application, but one of PID is not getting killed even with -9. Can I try some more things before restarting server.
root@pdvtil03:/# ps -ealf | grep -i 6177
0 S root 28101 10844 0 50 20 ? 220 ?... (14 Replies)
Hello all
i have simple server running on linux redhat 6.1
it is build with c++
in the server i have huge std vector that holds pointers to cache objects
those cache objects holds allot of data from the DB
any way ...
in some point in time there is simple API that suppose to clean the... (2 Replies)
I am building a wrapper around fgets, and fighting crashes for no reason I can explain.
I have stripped it down as far as I can and it still crashes.
#include <stdio.h>
#include <stdlib.h>
typedef struct {
char buf;
FILE *fp;
int type;
} wrap;
wrap... (12 Replies)
Hi Forum.
I have an XML file with the following requirement to move the <AdditionalAccountHolders> tag and its content right after the <accountHolderName> tag within the same file but I'm not sure how to accomplish this through a Unix script.
Any feedback will be greatly appreciated.
... (19 Replies)
Hi
We meet errors while running configuration scripts to prepare compiling source code on AIX 7.2. This error does not happen on AIX5.3 and AIX6.1
With the “/usr/bin/sh” from AIX7.2, sometimes , the script runs sucessfully, sometimes not. It’s unstable, and I don’t know why.
When... (10 Replies)
Hello,
I got into a wired state on one of solaris 10 server. When I noticed that server is having some issue, I found that there were dumpadm.conf entries in /etc/shadow and real entries were wiped of. Probably somebody fat fingers.
I was able to boot into failsafe, break SVM mirror, copied... (25 Replies)