Skip to content

src: simplify large pages mapping code

  • Introduce OnScopeLeave handler for cleaning up mmap()ed range(s).
  • Factor out failure scenario at the bottom of the function with fail label for use with goto.
  • Do not allocate temporary range (nmem) on FreeBSD, because it is not used.

The intention is that the steps involved in re-mapping to large pages become more clearly visible.

Signed-off-by: Gabriel Schulhof gabriel.schulhof@intel.com

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading