MemoryPool calls the Allocator directly

This commit is contained in:
Benoit Blanchon
2023-03-20 12:28:34 +01:00
parent 540901e219
commit 5faa3df43f
10 changed files with 131 additions and 86 deletions

View File

@ -11,8 +11,7 @@ using namespace ArduinoJson::detail;
static const size_t poolCapacity = 512;
TEST_CASE("MemoryPool::clear()") {
char buffer[poolCapacity];
MemoryPool pool(buffer, sizeof(buffer));
MemoryPool pool(poolCapacity);
SECTION("Discards allocated variants") {
pool.allocVariant();