Unix/Linux Go Back    

OpenSolaris 2009.06 - man page for munmap (opensolaris section 2)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

munmap(2)				   System Calls 				munmap(2)

       munmap - unmap pages of memory

       #include <sys/mman.h>

       int munmap(void *addr, size_t len);

       The  munmap()  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
       sysconf(3C).  If  addr  is  not	the  address  of a mapping established by a prior call to
       mmap(2), the behavior is undefined. After a successful call to  munmap()  and  before  any
       subsequent mapping of the unmapped pages, further references to these pages will result in
       the delivery of a SIGBUS or SIGSEGV signal to the process.

       The mmap(2) function often performs an implicit munmap().

       Upon successful completion, munmap() returns 0; otherwise, it returns -1 and sets errno to
       indicate an error.

       The munmap() function will fail if:

       EINVAL	 The   addr  argument  is  not	a  multiple  of  the  page  size  as  returned by
		 sysconf(3C); addresses in the range [addr, addr + len)  are  outside  the  valid
		 range	for the address space of a process; or the  len argument has a value less
		 than or equal to 0.

       See attributes(5) for descriptions of the following attributes:

       |      ATTRIBUTE TYPE	     |	    ATTRIBUTE VALUE	   |
       |Interface Stability	     |Standard			   |

       mmap(2), sysconf(3C), attributes(5), standards(5)

SunOS 5.11				    5 Jan 1998					munmap(2)
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 11:13 PM.