Function MUNMAP

Syntax

munmap address length => error

Arguments and values

address -- A non-negative integer, or nil.

length -- A non-negative integer.

error -- A fixnum.

Description

munmap deletes the mappings for the specified address range, and causes further references to addresses within the range to generate invalid memory references. The region is also automatically unmapped when the process is terminated.

The argument address must be a multiple of the page size. All pages containing a part of the indicated range are unmapped, and subsequent references to these pages will generate SIGSEGV. It is not an error if the indicated range does not contain any mapped pages.

Errors

+einval+

The argument address or the argument length is too large or not aligned on a page boundary.

+einval+

(since Linux 2.6.12) length was 0.