doc: add note about deferred buffer deallocation#38336
Closed
jasnell wants to merge 2 commits intonodejs:masterfrom
Closed
doc: add note about deferred buffer deallocation#38336jasnell wants to merge 2 commits intonodejs:masterfrom
jasnell wants to merge 2 commits intonodejs:masterfrom
Conversation
Signed-off-by: James M Snell <jasnell@gmail.com> Refs: nodejs#38300
benjamingr
approved these changes
Apr 21, 2021
VoltrexKeyva
approved these changes
Apr 21, 2021
addaleax
reviewed
Apr 21, 2021
Member
addaleax
left a comment
There was a problem hiding this comment.
Sooo... I think this already goes into way more detail than would be useful for users, and this is very implementation-detail-y (users won't care where the memory for an ArrayBuffer lives if they aren't writing addons, and V8 might change that at any time as well). Just saying "gc() is not a production utility and should not be considered a reliable way of reclaiming memory" (which we already do, I think) and maybe adding that some effects garbage collection are only visible asynchronously would already do it, tbh.
jasnell
added a commit
to jasnell/node
that referenced
this pull request
Apr 21, 2021
Previously, the code path would allocated a tracked ArrayBuffer that defers cleanup and deallocation of the underlying data with a SetImmediate. Avoid the unnecessary deferral by just allocating a `BackingStore` directly and writing into it. Fixes: nodejs#38300 Refs: nodejs#38336
This was referenced Apr 21, 2021
Member
Author
|
Closing in favor of #38337 |
targos
pushed a commit
that referenced
this pull request
Apr 24, 2021
Previously, the code path would allocated a tracked ArrayBuffer that defers cleanup and deallocation of the underlying data with a SetImmediate. Avoid the unnecessary deferral by just allocating a `BackingStore` directly and writing into it. Fixes: #38300 Refs: #38336 PR-URL: #38337 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
targos
pushed a commit
that referenced
this pull request
Apr 29, 2021
Previously, the code path would allocated a tracked ArrayBuffer that defers cleanup and deallocation of the underlying data with a SetImmediate. Avoid the unnecessary deferral by just allocating a `BackingStore` directly and writing into it. Fixes: #38300 Refs: #38336 PR-URL: #38337 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
targos
pushed a commit
that referenced
this pull request
May 30, 2021
Previously, the code path would allocated a tracked ArrayBuffer that defers cleanup and deallocation of the underlying data with a SetImmediate. Avoid the unnecessary deferral by just allocating a `BackingStore` directly and writing into it. Fixes: #38300 Refs: #38336 PR-URL: #38337 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
targos
pushed a commit
that referenced
this pull request
Jun 5, 2021
Previously, the code path would allocated a tracked ArrayBuffer that defers cleanup and deallocation of the underlying data with a SetImmediate. Avoid the unnecessary deferral by just allocating a `BackingStore` directly and writing into it. Fixes: #38300 Refs: #38336 PR-URL: #38337 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
targos
pushed a commit
that referenced
this pull request
Jun 11, 2021
Previously, the code path would allocated a tracked ArrayBuffer that defers cleanup and deallocation of the underlying data with a SetImmediate. Avoid the unnecessary deferral by just allocating a `BackingStore` directly and writing into it. Fixes: #38300 Refs: #38336 PR-URL: #38337 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/cc @Daninet @addaleax
@addaleax ... I know this only tells part of the story here (and may not describe it too well) but I don't know how much detail is going to be useful...
Signed-off-by: James M Snell jasnell@gmail.com
Refs: #38300