Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate ObjectPool into static and dynamic parts (#11371)
* Separate ObjectPool into static and dynamic parts The general goal of this refactor is to separate the static and dynamic parts of the ObjectPool so that developers that support heap allocation can also opt to use static allocation for portions of their code. This refactor maps ObjectPool to the same default types as current (dynamic if heap allocation is allowed, static otherwise). Upcoming refactor PRs: - adding unlocked iterator access so we can use range-based for loops (works more easily with the design of certain part of the SDK stack) - Demonstrating the use of the unsized abstract base type pointer for passing pools of unknown size * Apply suggestions from code review Co-authored-by: Michael Sandstedt <[email protected]> * Fix size_t and remove base class. Previous size_t changes broke the build - just using size_t now for all stats. Also remove the base class. The idea with that was to allow this pool to be used with the unsigned base classes in the mdns code. However, it looks like it's causing memory bloat despite the fact that nothing actually uses that base class. So it looks like maybe we just need to refactor to mdns. Co-authored-by: Michael Sandstedt <[email protected]>
- Loading branch information