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
01
Subchapter

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.

02
Subchapter

Buffer Allocation

How Buffer.alloc, Buffer.allocUnsafe, Buffer.from, slab pooling, and large Buffer allocation affect memory safety and performance in Node.js.

03
Subchapter

Buffer Operations

How Buffer views, copies, TypedArray interop, worker transfer, and zero-copy parsing affect byte ownership in Node.js.

04
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 more