-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert mmap()s to smart pointers #32532
Comments
@jasnell said
|
AFAICT |
@gabrielschulhof Right, I think this is sometime the |
That's what I was thinking too. A simple class which, in its constructor performs |
That works for me |
Replace `OnScopeLeave` with a class whose instance destructor performs the munmap(2). Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> Fixes: nodejs#32532 Co-Authored-By: Anna Henningsen <github@addaleax.net> Co-Authored-By: Ben Noordhuis <info@bnoordhuis.nl>
Replace `OnScopeLeave` with a class whose instance destructor performs the munmap(2). Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> Fixes: #32532 PR-URL: #32570 Co-Authored-By: Anna Henningsen <github@addaleax.net> Co-Authored-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
Replace `OnScopeLeave` with a class whose instance destructor performs the munmap(2). Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> Fixes: #32532 PR-URL: #32570 Co-Authored-By: Anna Henningsen <github@addaleax.net> Co-Authored-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
Replace `OnScopeLeave` with a class whose instance destructor performs the munmap(2). Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> Fixes: nodejs#32532 PR-URL: nodejs#32570 Co-Authored-By: Anna Henningsen <github@addaleax.net> Co-Authored-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
Replace `OnScopeLeave` with a class whose instance destructor performs the munmap(2). Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> Fixes: #32532 PR-URL: #32570 Co-Authored-By: Anna Henningsen <github@addaleax.net> Co-Authored-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
Re: #32396 (comment)
The text was updated successfully, but these errors were encountered: