Realize memory-mapped files on Mac.

The new Mac filesystem supports sparse files which means its
susceptible to SIGBUS errors due to failing to realize the file
when needed.  Make sure the file is fully realized during
creation.

The main use of this, persistent metrics, creates a "spare" file
sometime after startup and it is that file that is used during the
next run.  This largely eliminates any startup penalty from fully-
realizing the file.

Bug: 753741
Change-Id: I999cc1bdcc6c3e618cbf6241c7a3902b52774b9b
Reviewed-on: https://chromium-review.googlesource.com/753702
Commit-Queue: Brian White <bcwhite@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513870}

CrOS-Libchrome-Original-Commit: 773a925496736e01c7cb5e49bc8f420917fe9310
1 file changed
tree: eaca1116d34bc72e2f35a2e268eaedf53b314cac
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/