Node.js在哪里存储缓冲区? [英] Where does Node.js store buffers?
问题描述
The Node.js documentation on Buffer
says:
原始数据存储在
Buffer
类的实例中。缓冲区
类似于整数数组,但对应于V8堆外部的原始内存分配。缓冲区
无法调整大小。
Raw data is stored in instances of the
Buffer
class. ABuffer
is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. ABuffer
cannot be resized.
好的,所以缓冲区是不存储在V8堆中,但是......其中 Node.js实际存储它们?我很难想象它在堆栈上,是吗?
Okay, so buffers are not stored in the V8 heap, but… where does Node.js actually store them? I can hardly imagine that it's on the stack, is it?
换句话说:究竟是什么
V8堆外的原始内存分配
a raw memory allocation outside the V8 heap
实际上是什么意思?
推荐答案
v8堆区域的一侧。阅读以下链接将对您有所帮助。
out side of v8 heap area. read the below link will help you.
https://nodejs.org/api/smalloc.html#smalloc_smalloc
这篇关于Node.js在哪里存储缓冲区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!