CHAPTER 02
Buffers
Every subchapter in this chapter, free to read online. Work through them in order, or jump straight to the runtime detail you need.
02
chapter
4
subchapters
Free
online
Subchapter
02What Is a Buffer?
What a Buffer is in Node.js: a fixed-size mutable byte sequence for files, sockets, hashes, images, compressed payloads, and undecoded I/O.
Subchapter
03Buffer Allocation
How Buffer.alloc, Buffer.allocUnsafe, Buffer.from, slab pooling, and large Buffer allocation affect memory safety and performance in Node.js.
Subchapter
04Buffer Operations
How Buffer views, copies, TypedArray interop, worker transfer, and zero-copy parsing affect byte ownership in Node.js.
Subchapter
Buffer Fragmentation, Retained Views, and External Memory
How Buffer allocation can fragment external memory, pin large backing stores, interact with V8 accounting, and create performance problems in Node.js.
Other chapters
9 moreCHAPTER 01Node.js Architecture4 subchaptersCHAPTER 03Streams6 subchaptersCHAPTER 04File System5 subchaptersCHAPTER 05Process & OS4 subchaptersCHAPTER 06The Module System5 subchaptersCHAPTER 07Async Patterns & Control Flow6 subchaptersCHAPTER 08Runtime Platform APIs & Tooling5 subchaptersCHAPTER 09Network Fundamentals with Node.js7 subchaptersCHAPTER 10HTTP Servers, Clients & Proxies7 subchapters