-
Notifications
You must be signed in to change notification settings - Fork 30k
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
src: stop using v8::BackingStore::Reallocate
#52292
Conversation
Review requested:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions to avoid the copy when the size is the same.
(I do wonder now that we can't shrink the backing store in place, is there any benefit in allocating them on the V8 heap instead of using externally-managed buffers that we can realloc()? At least when we shrink externally-managed buffers we don't need to do the copy and it'll be cheaper. But that can be left as a TODO after we get rid of the deprecated API).
Updated! |
Something's wrong with the new changes. |
It's being deprecated by V8. Explicitly allocate a new ArrayBuffer and copy the data when needed instead. Fixes: nodejs#52234 Co-authored-by: Joyee Cheung <[email protected]>
Landed in ec15504 |
It's being deprecated by V8. Explicitly allocate a new ArrayBuffer and copy the data when needed instead. Fixes: #52234 Co-authored-by: Joyee Cheung <[email protected]> PR-URL: #52292 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
It's being deprecated by V8. Explicitly allocate a new ArrayBuffer and copy the data when needed instead. Fixes: #52234 Co-authored-by: Joyee Cheung <[email protected]> PR-URL: #52292 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
It's being deprecated by V8.
Explicitly allocate a new ArrayBuffer and copy the data instead.
Fixes: #52234