-
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
doc: document Buffer.concat may use internal pool #35541
doc: document Buffer.concat may use internal pool #35541
Conversation
@addaleax isn't this behavior problematic for |
Yes and no. Should be fine in regards to the problem I was worried about. What's unfortunate is that there is no way to not use the pool when concatenating if I know that might cause problems or reduced performance (e.g. transferList). But maybe that is just a nit. |
Users may decide to implement their own concat method which doesn't use the pool. Alternatively, we could introduce As for this very PR, it simply describes what we have now. |
Yes, sorry for going off-topic. |
PR-URL: #35541 Refs: #32703 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Harshitha K P <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Robert Nagy <[email protected]>
Landed in ef1645e |
PR-URL: #35541 Refs: #32703 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Harshitha K P <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Robert Nagy <[email protected]>
PR-URL: #35541 Refs: #32703 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Harshitha K P <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Robert Nagy <[email protected]>
PR-URL: #35541 Refs: #32703 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Harshitha K P <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Robert Nagy <[email protected]>
PR-URL: nodejs#35541 Refs: nodejs#32703 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Harshitha K P <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Robert Nagy <[email protected]>
Refs: #32703
The documentation was silent about the fact that
Buffer.concat()
usesBuffer.allocaUnsafe()
and, thus, may return pooled buffers. This PR fixes that.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes