The Buffer.poolSize property is an inbuilt application programming interface of class Buffer with in Buffer module that gives the size (in bytes) of pre-allocated internal Buffer instances used for pooling. This value may be modified.
Syntax:
javascript
Output:
javascript
Output:
Buffer.poolSize = valueReturn Value: It returns the size of the internal Buffer instances used for pooling. Example 1:
// Node.js program to demonstrate the
// Buffer.poolSize property
// Assign the poolsize to the buffer
Buffer.poolSize = 1024;
// Display the buffer poolsize
console.log(Buffer.poolSize);
1024Example 2:
// Node.js program to demonstrate the
// Buffer.poolSize property
// Display the default buffer poolsize
console.log(Buffer.poolSize);
8192Reference:https://nodejs.org/api/buffer.html#buffer_class_property_buffer_poolsize