Preallocate pool list

This commit is contained in:
Benoit Blanchon
2023-07-21 10:38:35 +02:00
parent f427706e06
commit 1a14499612
19 changed files with 183 additions and 143 deletions

View File

@ -19,7 +19,7 @@ TEST_CASE("ResourceManager::size()") {
}
SECTION("Doesn't grow when allocation of second pool fails") {
allocator.setCountdown(2);
allocator.setCountdown(1);
for (size_t i = 0; i < ARDUINOJSON_POOL_CAPACITY; i++)
resources.allocSlot();
size_t size = resources.size();