FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

src: use make_shared for safe allocation by yashLadha · Pull Request #37139 · nodejs/node · GitHub

/ node Public

src: use make_shared for safe allocation - #37139

Merged
Trott merged 1 commit into
nodejs:masterfrom
yashLadha:fix_reduce_allocation
Feb 6, 2021
Merged

src: use make_shared for safe allocation#37139
Trott merged 1 commit into
nodejs:masterfrom
yashLadha:fix_reduce_allocation

Conversation

Copy link
Copy Markdown
Contributor

No description provided.

nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Jan 30, 2021

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Contributor Author

Can I go ahead and deploy @addaleax @jasnell @cjihrig?

Trott force-pushed the fix_reduce_allocation branch from 0c80e8c to f3381a2 Compare February 6, 2021 17:02
Using the reset does a double allocation and is error prone if some
exception occured which is very unlikely but can happen. make_shared_ptr
gives hedge over this and handle the failure in allocation.

PR-URL: nodejs#37139
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Trott force-pushed the fix_reduce_allocation branch from f3381a2 to 36cc0ee Compare February 6, 2021 17:03
Trott merged commit 36cc0ee into nodejs:master Feb 6, 2021

Trott commented Feb 6, 2021

Copy link
Copy Markdown
Member

Landed in 36cc0ee

danielleadams pushed a commit that referenced this pull request Feb 16, 2021
Using the reset does a double allocation and is error prone if some
exception occured which is very unlikely but can happen. make_shared_ptr
gives hedge over this and handle the failure in allocation.

PR-URL: #37139
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This was referenced Feb 16, 2021
targos pushed a commit that referenced this pull request May 1, 2021
Using the reset does a double allocation and is error prone if some
exception occured which is very unlikely but can happen. make_shared_ptr
gives hedge over this and handle the failure in allocation.

PR-URL: #37139
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
danielleadams mentioned this pull request May 3, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL