Oak
Oak copied to clipboard
configurable BlocksPool
It would be nice to allow some of the properties of BlocksPool to be configurable. Either via a configuration file and/or programmatically.
- The block size
- The number of blocks to be pre-allocated (even allow zero pre-allocation)
- The number of blocks to allocate each time a new block is needed
- Minimal and maximal number of unused blocks to preserve until releasing them back to the OS (excess blocks)
Specifically, it would be nice that the preallocated blocks would be a different setting than the number of new blocks to allocate, and that the number of excess blocks could be set via a ratio and/or via a specific number. Also, the excess number of blocks should have a high and low threshold to prevent releasing blocks one at a time. It might also help to set the number of excess blocks with proportion to the total number of blocks.