unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

MUNMAP(2)                     System Calls Manual                    MUNMAP(2)



NAME
       munmap - unmap pages of memory.

SYNOPSIS
       #include <&lt;sys/mman.h>&gt;

       int munmap(addr, len)
       caddr_t addr;
       int len;

DESCRIPTION
       munmap()  removes  the  mappings  for  pages in the range [addr, addr +
       len).  Further references to these pages will result in the delivery of
       a SIGSEGV signal to the process, unless these pages are considered part
       of the "data" or "stack" segments.

       brk() and mmap() often perform implicit munmap's.

RETURN VALUES
       munmap() returns:

       0      on success.

       -1     on failure and sets errno to indicate the error.

ERRORS
       EINVAL         addr is not a multiple of the page size as  returned  by
                      getpagesize(2).

                      Addresses  in  the  range [addr, addr + len) are outside
                      the valid range for the address space of a process.

SEE ALSO
       brk(2), getpagesize(2), mmap(2)



                                21 January 1990                      MUNMAP(2)