Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardNodeJSBuffer pool and allocationSingle-choice MCQ

Two small Buffers are created with Buffer.allocUnsafe(8) back to back early in the process. Inspecting their .buffer (the underlying ArrayBuffer) and .byteOffset, what is true and why does it matter for safety?

const a = Buffer.allocUnsafe(8); const b = Buffer.allocUnsafe(8); console.log(a.buffer === b.buffer); console.log(a.byteOffset, b.byteOffset);