elastic / ml-cpp

Machine learning C++ code
Other
149 stars 62 forks source link

[ML] Remove allocators from cache after usage #2679

Closed valeriy42 closed 2 months ago

valeriy42 commented 2 months ago

In the CBoostJsonWriteBase class, we maintain a cache of allocators that should be reused when we write new results. Although we took measures to free memory in these allocators, it was still not completely possible. As a result, we noticed a gradual increase in memory usage by native processes due to the increasing size of the allocators in the cache.

This PR ensures that the allocator is removed from the cache and the memory is freed.

Related to #2664

valeriy42 commented 2 months ago

buildkite run_qa_tests on linux