Store static string in a dedicated pool

This commit is contained in:
Benoit Blanchon
2025-02-27 13:42:04 +01:00
parent 907bb43481
commit 08b2400592
25 changed files with 133 additions and 63 deletions
@@ -62,6 +62,7 @@ TEST_CASE("JsonDocument constructor") {
REQUIRE(doc2.as<std::string>() == "{\"hello\":\"world\"}");
REQUIRE(spyingAllocator.log() == AllocatorLog{
Allocate(sizeofPool()),
Allocate(sizeofStaticStringPool()),
});
}
@@ -85,6 +86,7 @@ TEST_CASE("JsonDocument constructor") {
REQUIRE(doc2.as<std::string>() == "[\"hello\"]");
REQUIRE(spyingAllocator.log() == AllocatorLog{
Allocate(sizeofPool()),
Allocate(sizeofStaticStringPool()),
});
}