Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ munmap(2) — CLIX 3.1r7.6.28

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getpagesize(2)

mmap(2)

msync(2)



  munmap(2)                           CLIX                           munmap(2)



  NAME

    munmap - Unmaps pages of memory

  LIBRARY

    Standard C Library (libc.a)

  SYNOPSIS

    #include <sys/types.h>

    #include <sys/mman.h>

    munmap(
      caddr_t addr ,
      size_t len );

  PARAMETERS

    addr   Specifies an address obtained from a previous call to mmap().

    len    Specifies the number of bytes associated with addr.

  DESCRIPTION

    The munmap() function 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.

  CAUTIONS

    The munmap() function does not write modified pages to the permanent
    storage location.  To write modified pages to the permanent location, use
    the msync() function.

  RETURN VALUES

    If successful, the munmap() function returns a value of 0.  If
    unsuccessful, it returns a value of -1.

  ERRORS

    The munmap() function fails and sets errno if any of the following
    conditions are true:

    [EINVAL]   The addr parameter is not a multiple of page size as returned
               by getpagesize().

    [EINVAL]   The addresses in the range [addr, addr + len) are outside the
               valid range for the address space of a process.



  2/94 - Intergraph Corporation                                              1






  munmap(2)                           CLIX                           munmap(2)



  RELATED INFORMATION

    Functions:  getpagesize(2), mmap(2), msync(2)



















































  2                                              Intergraph Corporation - 2/94




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026