Commit a2aa52b 1 parent a9d0b8d commit a2aa52b Copy full SHA for a2aa52b
File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -805,10 +805,9 @@ A `TypeError` will be thrown if `size` is not a number.
805
805
806
806
The ` Buffer ` module pre-allocates an internal ` Buffer ` instance of
807
807
size [ ` Buffer.poolSize ` ] [ ] that is used as a pool for the fast allocation of new
808
- ` Buffer ` instances created using [ ` Buffer.allocUnsafe() ` ] [ ] ,
809
- [ ` Buffer.from(array) ` ] [ ] , [ ` Buffer.concat() ` ] [ ] , and the deprecated
810
- ` new Buffer(size) ` constructor only when ` size ` is less than or equal
811
- to ` Buffer.poolSize >> 1 ` (floor of [ ` Buffer.poolSize ` ] [ ] divided by two).
808
+ ` Buffer ` instances created using [ ` Buffer.allocUnsafe() ` ] [ ] , [ ` Buffer.from(array) ` ] [ ] ,
809
+ and [ ` Buffer.concat() ` ] [ ] only when ` size ` is less than or equal to
810
+ ` Buffer.poolSize >> 1 ` (floor of [ ` Buffer.poolSize ` ] [ ] divided by two).
812
811
813
812
Use of this pre-allocated internal memory pool is a key difference between
814
813
calling ` Buffer.alloc(size, fill) ` vs. ` Buffer.allocUnsafe(size).fill(fill) ` .
You can’t perform that action at this time.
0 commit comments