If _POSIX_MEMLOCK is defined or the implementation supports the
mlockall() function as defined in System Interfaces and Headers, Issue
5:
  A succesful call to mlockall() when flags contains MCL_CURRENT shall
  cause all of the pages currently mapped by the address space of a
  process to be locked and return 0.

If _POSIX_MEMLOCK is defined or the implementation supports the
mlockall() function as defined in System Interfaces and Headers, Issue
5:
  A succesful call to mlockall() when flags contains MCL_FUTURE shall
  cause all of the pages mapped by the address space of a process in
  the future, when those mappings are established, to be locked, and
  return 0.

If _POSIX_MEMLOCK is defined or the implementation supports the
mlockall() function as defined in System Interfaces and Headers, Issue
5:
  A succesful call to mlockall() when flags contains MCL_FUTURE and
  MCL_CURRENT shall cause all of the pages currently mapped by the
  address space of a process and those mapped in the future, when
  those mappings are established, to be locked, and return 0.

If _POSIX_MEMLOCK is defined or the implementation supports the
mlockall() function as defined in System Interfaces and Headers, Issue
5:
  A call to mlockall() when flags is 0 shall return -1 and set errno
  to EINVAL.

If _POSIX_MEMLOCK is defined or the implementation supports the
mlockall() function as defined in System Interfaces and Headers, Issue
5:
  A call to mlockall() when flags contains unimplemented flags shall
  return -1 and set errno to EINVAL.

If _POSIX_MEMLOCK is defined or the implementation supports the
mlockall() function as defined in System Interfaces and Headers, Issue
5 and the implementation requires a process to have appropriate
privilege to call mlockall():
  A call to mlockall() when the calling process does not have the
  appropriate privilege to perform the requested operation shall
  return -1 and set errno to EPERM.

If _POSIX_MEMLOCK is not defined and the implementation codes not
support the mlockall() function as defined in System Interfaces and
Headers, Issue 5:
  A call to mlockall() shall return -1 and set errno to ENOSYS.