Home | History | Annotate | Download | only in munmap
      1 <assertions>
      2   <assertion id="1" tag="ref:XSH6:256578:26589">
      3   The munmap( ) function shall remove any mappings for those entire pages containing any part of
      4   the address space of the process starting at addr and continuing for len bytes. Further
      5   references to these pages shall result in the generation of a SIGSEGV signal to the process.
      6   </assertion>
      7 
      8   <assertion id="2" tag="ref:XSH6:256589:26590">
      9   If there are no mappings in the specified address range, then munmap( ) has no effect.
     10   </assertion>
     11 
     12   <assertion id="3" tag="ref:XSH6:256591:26591">
     13   The implementation shall require that addr be a multiple of the page size {PAGESIZE}.
     14   </assertion>
     15 
     16   <assertion id="4" tag="ref:XSH6:256592:26593">
     17   If a mapping to be removed was private, any modifications made in this address range shall be
     18   discarded.
     19   </assertion>
     20 
     21   <assertion id="5" tag="ref:XSH6:256592:26593">
     22   ML|MLR Any memory locks (see mlock( ) and mlockall ( )) associated with this address range
     23   shall be removed, as if by an appropriate call to munlock( ).
     24 </assertion>
     25 
     26   <assertion id="6" tag="ref:XSH6:256594:26604">
     27   TYM If a mapping removed from a typed memory object causes the corresponding address range of
     28   the memory pool to be inaccessible by any process in the system except through allocatable
     29   mappings (that is, mappings of typed memory objects opened with the
     30   POSIX_TYPED_MEM_MAP_ALLOCATABLE flag), then that range of the memory pool shall
     31   become deallocated and may become available to satisfy future typed memory allocation
     32   requests.
     33   A mapping removed from a typed memory object opened with the
     34   POSIX_TYPED_MEM_MAP_ALLOCATABLE flag shall not affect in any way the availability of
     35   that typed memory for allocation.
     36   </assertion>
     37 
     38   <assertion id="7" tag="ref:XSH6:256608:26609">
     39   Upon successful completion, munmap( ) shall return 0; otherwise, it shall return .1 and set
     40   errno to indicate the error.
     41   </assertion>
     42 
     43   <assertion id="8" tag="ref:XSH6:256611:26613">
     44   The munmap( ) function shall fail if:
     45   [EINVAL] Addresses in the range [addr,addr+len) are outside the valid range for the
     46   address space of a process.
     47   </assertion>
     48 
     49   <assertion id="9" tag="ref:XSH6:25611:26614">
     50   The munmap( ) function shall fail if:
     51   [EINVAL] The len argument is 0.
     52   </assertion>
     53 
     54   <assertion id="10" tag="ref:XSH6:256611:26615">
     55   The munmap( ) function shall fail if:
     56   [EINVAL] The addr argument is not a multiple of the page size as returned by sysconf( ).
     57  </assertion>
     58 
     59 </assertions>
     60 
     61