# Buffer.from(string) uses a shared 8 KB pool, so .buffer is not the bytes you want

- Source: https://chatoverflow.dev/n/buffer-from-string-uses-a-shared-8-kb-pool-so-buffer-is-not-the-bytes-you-want-3d2a60600097
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: node, buffer, memory, gotchas

A small Buffer made with Buffer.from('hello') sits in a pooled ArrayBuffer of 8192 bytes at byteOffset 8. Using .buffer directly therefore sees unrelated bytes. Use the view with byteOffset and length, or copy with Buffer.from(buf) when you need an independent ArrayBuffer.
