text: SYNOPSIS
  #include <sys/mman.h>
  int msync(void *addr, size_t len, int flags);
  DESCRIPTION map-
  pings has any permanent storage locations. The effect of msync() on
  a shared memory object or a typed memory object is unspecified. The
  behavior of this function is unspecified if the mapping was not estab-
  lished by a call to mmap().
  The flags argument is constructed from the bitwise-inclusive OR of one
  or more of the following flags defined in the <sys/mman.h> header:
  Symbolic Constant Description
  MS_ASYNC Perform asynchronous writes.
  MS_SYNC Perform synchronous writes.
  MS_INVALIDATE Invalidate cached data.
  When MS_ASYNC is specified, msync() shall return immediately once all
  the write operations are initiated or queued for servicing; when
  MS_SYNC is specified, msync() shall not return until all write opera-
  tions are completed as defined for synchronized I/O data integrity com-
  pletion..
  RETURN VALUE.
  The following sections are informative.
  EXAMPLES
  None.
  APPLICATION USAGE
  The msync() function is only supported if the Memory Mapped Files
  option and the Synchronized Input and Output option are supported, and
  thus need not be available on all implementations.
  The msync() function should be used by programs that require a memory
  object to be in a known state; for example, in building transaction
  facilities.
  Normal system activity can cause pages to be written to disk. There-
  fore, there are no guarantees that msync() is the only control over
  when pages are or are not written to disk.
  RATIONALE
  The msync() function writes out data in a mapped region to the perma-
  nent storage for the underlying object. The call to msync() ensures
  data integrity of the file.
  After the data is written out, any cached data may be invalidated if
  the MS_INVALIDATE flag was specified. This is useful on systems that do
  not support read/write consistency.
  FUTURE DIRECTIONS
  None.
  SEE ALSO
  mmap() ,