Open In App
Related Articles

Node.js Buffer.poolSize Property

Improve Article
Improve
Save Article
Save
Like Article
Like

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:

Buffer.poolSize = value

Return 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);


Output:

1024

Example 2:




// Node.js program to demonstrate the   
// Buffer.poolSize property
  
// Display the default buffer poolsize
console.log(Buffer.poolSize);


Output:

8192

Reference:https://nodejs.org/api/buffer.html#buffer_class_property_buffer_poolsize

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 13 Oct, 2021
Like Article
Save Article
Previous
Next
Similar Reads
Complete Tutorials