What is poolSize in Node.js Buffer Module?

The poolSize property in Node.js Buffer module

poolSize is a property of the Buffer class in the Node.js Buffer module. poolSize specifies the size of Buffer instances used internally by Node.js for pooling. The size is defined in bytes and the default value is 8192 bytes. The following example shows the default value of poolSize and demonstrates how to change this value:

console.log('Default poolSize value:', Buffer.poolSize);
Buffer.poolSize = 512;
console.log('Changed poolSize value:', Buffer.poolSize);

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved