Node.js在哪里存储缓冲区? [英] Where does Node.js store buffers?

查看:80
本文介绍了Node.js在哪里存储缓冲区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Buffer 上的Node.js文档说:

The Node.js documentation on Buffer says:


原始数据存储在 Buffer 类的实例中。 缓冲区类似于整数数组,但对应于V8堆外部的原始内存分配。 缓冲区无法调整大小。

Raw data is stored in instances of the Buffer class. A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆