Uh oh!
There was an error while loading. Please reload this page.
doc: document Buffer.concat may use internal pool - #35541
Conversation
nodejs-github-bot
commented
Oct 13, 2020
@addaleax isn't this behavior problematic for |
addaleax
commented
Oct 13, 2020
ronag
commented
Oct 13, 2020
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. |
puzpuzpuz
commented
Oct 13, 2020
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. |
ronag
commented
Oct 13, 2020
Yes, sorry for going off-topic. |
nodejs-github-bot
commented
Oct 13, 2020
nodejs-github-bot
commented
Oct 14, 2020
nodejs-github-bot
commented
Oct 14, 2020
nodejs-github-bot
commented
Oct 14, 2020
puzpuzpuz
commented
Oct 14, 2020
Landed in ef1645e |
PR-URL: nodejs#35541 Refs: nodejs#32703 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Harshitha K P <harshitha014@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com>
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