Files
json/include
Niels Lohmann 027d730547 Reserve the result of dump() in big steps once the output is big
dump() appended to an empty string, which reallocates and copies the output
each time it doubles; with glibc every new big block is fresh memory that is
faulted in page by page. dump() now uses its own output adapter: the first
write of at least 512 characters reserves 1 MiB, and four times as much
whenever that is not enough, up to 64 MiB. Smaller outputs never reserve.
String types without reserve() keep appending.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2026-11-29 12:28:26 +01:00
..