| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -807,10 +807,9 @@ A `TypeError` will be thrown if `size` is not a number. | |||
| 807 | 807 | ||
| 808 | 808 | The `Buffer` module pre-allocates an internal `Buffer` instance of | |
| 809 | 809 | size [`Buffer.poolSize`][] that is used as a pool for the fast allocation of new | |
| 810 | - `Buffer` instances created using [`Buffer.allocUnsafe()`][], | ||
| 811 | - [`Buffer.from(array)`][], [`Buffer.concat()`][], and the deprecated | ||
| 812 | - `new Buffer(size)` constructor only when `size` is less than or equal | ||
| 813 | - to `Buffer.poolSize >> 1` (floor of [`Buffer.poolSize`][] divided by two). | ||
| 810 | + `Buffer` instances created using [`Buffer.allocUnsafe()`][], [`Buffer.from(array)`][], | ||
| 811 | + and [`Buffer.concat()`][] only when `size` is less than or equal to | ||
| 812 | + `Buffer.poolSize >> 1` (floor of [`Buffer.poolSize`][] divided by two). | ||
| 814 | 813 | ||
| 815 | 814 | Use of this pre-allocated internal memory pool is a key difference between | |
| 816 | 815 | calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments