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