Nodejs Understanding Buffer

Source: Internet
Author: User

Node inside the buffer is actually used for network requests, file read and so on, and is allocated outside the heap, will not occupy the heap of memory, this is because the original V8 memory is very small, if you read large files, then ...

Before have seen Logstash buffer source, feel more advanced than this .... and the buffer in Ruby is a bit of a cache of nature, support size constraints, and timed refresh and so on ...

It seems that buffer is to solve the V8 before the browser-side small memory limitations, and directly on the bottom of the heap to apply for large memory, but also afraid of the current application to increase the CPU load, so the use of the form of block applications.

In addition, buffer in the unified encoding format, so the data is stored in hexadecimal two digits, so the memory and marriage when different encoding storage content is not the same, be sure to pay attention to coding.

Nodejs Understanding Buffer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.