doc: fixed misinformation in Buffer.allocUnsafe method
issue: #50635 (closed)
Changes Made: Corrected the documentation regarding Buffer.allocUnsafe method by adding missing information. The discrepancy was identified in the logic for pre-allocating an internal Buffer. The documentation stated:
... only when size is less than or equal to Buffer.poolSize >> 1 (floor of Buffer.poolSize divided by two).
However, the actual code implementation uses:
if (size < (Buffer.poolSize >>> 1)) {
I have updated the documentation to accurately reflect the code logic.
Affected URL(s):
https://nodejs.org/dist/latest-v20.x/docs/api/buffer.html#static-method-bufferallocunsafesize