Preallocate pool list

This commit is contained in:
Benoit Blanchon committed 2023-07-21 17:57:13 +02:00
1 parent f427706e06
commit 1a14499612
19 files changed
+183 -143

No files matched your search

+1 -1
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();