Visit The New, Modern Unix Linux Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #737
Difficulty: Medium
In 1979, the TRS-80 had the largest selection of software in the microcomputer market.
True or False?
Linux & Unix Commands - Search Man Pages

munmap(2) [freebsd man page]

MUNMAP(2)						      BSD System Calls Manual							 MUNMAP(2)

NAME
munmap -- remove a mapping LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/mman.h> int munmap(void *addr, size_t len); DESCRIPTION
The munmap() system call deletes the mappings for the specified address range, and causes further references to addresses within the range to generate invalid memory references. RETURN VALUES
The munmap() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error. ERRORS
The munmap() system call will fail if: [EINVAL] The addr argument was not page aligned, the len argument was zero or negative, or some part of the region being unmapped is outside the valid address range for a process. SEE ALSO
madvise(2), mincore(2), mmap(2), mprotect(2), msync(2), getpagesize(3) HISTORY
The munmap() system call first appeared in 4.4BSD. BSD
May 27, 1994 BSD

Check Out this Related Man Page

MUNMAP(2)						      BSD System Calls Manual							 MUNMAP(2)

NAME
munmap -- remove a mapping LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/mman.h> int munmap(void *addr, size_t len); DESCRIPTION
The munmap() system call deletes the mappings for the specified address range, and causes further references to addresses within the range to generate invalid memory references. RETURN VALUES
Upon successful completion, munmap returns zero. Otherwise, a value of -1 is returned and errno is set to indicate the error. ERRORS
munmap() will fail if: [EINVAL] The addr parameter was not page aligned, the len parameter was negative, or some part of the region being unmapped is out- side the valid address range for a process. SEE ALSO
madvise(2), mincore(2), mlock(2), mmap(2), mprotect(2), msync(2), getpagesize(3) STANDARDS
The munmap() function conforms to IEEE Std 1003.1b-1993 (``POSIX.1''). HISTORY
The munmap() function first appeared in 4.4BSD. BSD
May 27, 1994 BSD

13 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

mmap()

how to use mmap() to map a file to memory space. Do you have any simple program???? Because I have to implement lot of concepts into it. (3 Replies)
Discussion started by: gokult
3 Replies

2. Shell Programming and Scripting

How to use an input pipe ?

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)
Discussion started by: LeNouveau
4 Replies

3. Programming

Memory Leaks

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)
Discussion started by: rupeshkp728
9 Replies

4. Solaris

Oracle DB install failure

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)
Discussion started by: asilv
13 Replies

5. Solaris

Rpcbind service not starting

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)
Discussion started by: Madrox72
2 Replies

6. Solaris

Illegal Instruction error

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)
Discussion started by: Wpgn
12 Replies

7. Red Hat

Ldap user does not exists

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)
Discussion started by: babinlonston
3 Replies

8. Solaris

Not able to kill a process

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)
Discussion started by: solaris_1977
14 Replies

9. Programming

How to decrease virtual size of a process after cleaning all containers and using malloc_trim (0)?

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)
Discussion started by: umen
2 Replies

10. Programming

Inexplicable buffer crash

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)
Discussion started by: Corona688
12 Replies

11. Shell Programming and Scripting

Moving XML tag/contents after specific XML tag within same file

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)
Discussion started by: pchang
19 Replies

12. AIX

Compiling problem - AIX 7.2

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)
Discussion started by: bobochacha29
10 Replies

13. Solaris

Root user not recognizing on Solaris-10 (shadow file corruption)

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)
Discussion started by: solaris_1977
25 Replies

Featured Tech Videos