Skip to content

Commit e603452

Browse files
committed
Documentation update about Buffer initialization
per: nodejs/node-v0.x-archive@53b6a61 fixes nodejs/node-v0.x-archive#7230 Original commit patch did not apply cleanly Originally contributed by @sarathms
1 parent f32f822 commit e603452

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/api/buffer.markdown

+4
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ Allocates a new buffer of `size` bytes. `size` must be less than
6767
2,147,483,648 bytes (2 GB) on 64 bits architectures,
6868
otherwise a `RangeError` is thrown.
6969

70+
Unlike `ArrayBuffers`, the underlying memory for buffers is not initialized. So
71+
the contents of a newly created `Buffer` is unknown. Use `buf.fill(0)`to
72+
initialize a buffer to zeroes.
73+
7074
### new Buffer(array)
7175

7276
* `array` Array

0 commit comments

Comments
 (0)