Commit fa3fd78c authored by Gabriel Schulhof's avatar Gabriel Schulhof
Browse files

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: default avatarGabriel Schulhof <gabriel.schulhof@intel.com>
Co-authored-by: default avatarBen Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/nodejs/node/pull/32396


Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarDavid Carlier <devnexen@gmail.com>
parent 436c71db
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment