Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Use a pool allocator for shared_ptrs with blocks, elections and votes #2047
After profiling heap usage with a high amount of real-time transactions I found a couple places that could benefit from using a memory pool. In #2025 one had been added for block deserialization, however because the block objects were put in a
During node bootstrapping there can be a large number of blocks existing in the block processor (300MB worth on my run). This will never be reclaimed when using a memory pool until the node is stopped. Calling
A helper guard class has been created which wraps all the necessary memory pool clean up functions.