Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortakayama <takayama@foxmail.com>2021-04-23 17:21:13 +0300
committerRich Trott <rtrott@gmail.com>2021-04-26 19:31:05 +0300
commit0577fe3f2690bff0f7cf1a60613cdc3d50b59e4a (patch)
treeeee3927658ae9e4bd039f198f132284fd109ebcd /doc/api/worker_threads.md
parentb2be410f533c4fdce60ed0d257ab7a6cd2f1da8a (diff)
doc: fix typo in worker_threads.md
"Buffer.alloc()" -> "Buffer.allocUnsafe()" Buffer.alloc() does not use the internal Buffer pool. PR-URL: https://github.com/nodejs/node/pull/38368 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'doc/api/worker_threads.md')
-rw-r--r--doc/api/worker_threads.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md
index f35757fe82d..5d0781751ca 100644
--- a/doc/api/worker_threads.md
+++ b/doc/api/worker_threads.md
@@ -666,7 +666,7 @@ Depending on how a `Buffer` instance was created, it may or may
not own its underlying `ArrayBuffer`. An `ArrayBuffer` must not
be transferred unless it is known that the `Buffer` instance
owns it. In particular, for `Buffer`s created from the internal
-`Buffer` pool (using, for instance `Buffer.from()` or `Buffer.alloc()`),
+`Buffer` pool (using, for instance `Buffer.from()` or `Buffer.allocUnsafe()`),
transferring them is not possible and they are always cloned,
which sends a copy of the entire `Buffer` pool.
This behavior may come with unintended higher memory