From 4516e6dda4ed7ecc25a5ad164e4d7ade039bb657 Mon Sep 17 00:00:00 2001 From: Jackson Tian Date: Wed, 6 Aug 2014 14:35:35 +0800 Subject: [PATCH] doc: document max `new Buffer(size)` Signed-off-by: Timothy J Fontaine --- doc/api/buffer.markdown | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/api/buffer.markdown b/doc/api/buffer.markdown index 3e6289ec10..b384b05f43 100644 --- a/doc/api/buffer.markdown +++ b/doc/api/buffer.markdown @@ -62,7 +62,9 @@ It can be constructed in a variety of ways. * `size` Number -Allocates a new buffer of `size` octets. +Allocates a new buffer of `size` octets. Note, `size` must be no more than +[kMaxLength](smalloc.html#smalloc_smalloc_kmaxlength). Otherwise, a `RangeError` +will be thrown here. ### new Buffer(array)