Added memory usage

This commit is contained in:
Benoit Blanchon
2014-11-11 14:46:23 +01:00
parent 0c9451fd5f
commit 5236de1433
2 changed files with 10 additions and 1 deletions

View File

@ -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.
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 |

View File