From 5236de1433f96ea1930e6fbf53008e8b9b54024c Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Tue, 11 Nov 2014 14:46:23 +0100 Subject: [PATCH] Added memory usage --- doc/Memory model.md | 11 ++++++++++- doc/Memory usage.md | 0 2 files changed, 10 insertions(+), 1 deletion(-) delete mode 100644 doc/Memory usage.md diff --git a/doc/Memory model.md b/doc/Memory model.md index 8b6903fd..eefb85ee 100644 --- a/doc/Memory model.md +++ b/doc/Memory model.md @@ -48,4 +48,13 @@ This fixed allocation approach may seem a bit strange, especially if your a desk Don't forget that, the memory is "freed" as soon as the `StaticJsonBuffer` is out of scope, like any other variable. It only hold the memory for a short amount of time. -For that reason, you should never use a `StaticJsonBuffer` as a **global variable** because it would hold a lot of memory for the whole life of the program. \ No newline at end of file +For that reason, you should never use a `StaticJsonBuffer` as a **global variable** because it would hold a lot of memory for the whole life of the program. + +## Memory usage + +#### Object size for 8-bit AVR + +| Type | Size | +|-------------------------|------------| +| JsonArray of N element | 4 + 8 * N | +| JsonObject of N element | 4 + 10 * N | \ No newline at end of file diff --git a/doc/Memory usage.md b/doc/Memory usage.md deleted file mode 100644 index e69de29b..00000000