src: simplify large pages mapping code · nodejs/node@09cd744 · GitHub
Skip to content

Commit 09cd744

Browse files
Gabriel Schulhofbnoordhuis
authored andcommitted
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> Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl> PR-URL: #32396 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com>
1 parent 2f8f619 commit 09cd744

1 file changed

Lines changed: 25 additions & 56 deletions

File tree

src/large_pages/node_large_page.cc

Lines changed: 25 additions & 56 deletions

0 commit comments

Comments
 (0)