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
What 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.
Buffer Allocation
How Buffer.alloc, Buffer.allocUnsafe, Buffer.from, slab pooling, and large Buffer allocation affect memory safety and performance in Node.js.
Buffer Operations
How Buffer views, copies, TypedArray interop, worker transfer, and zero-copy parsing affect byte ownership in Node.js.
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
13 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 subchaptersCHAPTER 11TLS, HTTPS & HTTP/26 subchaptersCHAPTER 12API Design, Contracts & Frameworks7 subchaptersCHAPTER 13Realtime & Streaming APIs5 subchaptersCHAPTER 14Child Processes & OS Workloads2 subchapters