forked from bblanchon/ArduinoJson
Increased the default capacity of DynamicJsonDocument
This commit is contained in:
@ -8,6 +8,7 @@ HEAD
|
|||||||
* Allow mixed configuration in compilation units (issue #809)
|
* Allow mixed configuration in compilation units (issue #809)
|
||||||
* Fixed object keys not being duplicated
|
* Fixed object keys not being duplicated
|
||||||
* `JsonPair::key()` now returns a `JsonKey`
|
* `JsonPair::key()` now returns a `JsonKey`
|
||||||
|
* Increased the default capacity of `DynamicJsonDocument`
|
||||||
|
|
||||||
v6.4.0-beta (2018-09-11)
|
v6.4.0-beta (2018-09-11)
|
||||||
-----------
|
-----------
|
||||||
|
@ -53,6 +53,11 @@
|
|||||||
#define ARDUINOJSON_DEFAULT_NESTING_LIMIT 10
|
#define ARDUINOJSON_DEFAULT_NESTING_LIMIT 10
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Default capacity for DynamicJsonDocument
|
||||||
|
#ifndef ARDUINOJSON_DEFAULT_POOL_SIZE
|
||||||
|
#define ARDUINOJSON_DEFAULT_POOL_SIZE 1024
|
||||||
|
#endif
|
||||||
|
|
||||||
#else // ARDUINOJSON_EMBEDDED_MODE
|
#else // ARDUINOJSON_EMBEDDED_MODE
|
||||||
|
|
||||||
// On a computer we have plenty of memory so we can use doubles
|
// On a computer we have plenty of memory so we can use doubles
|
||||||
@ -84,6 +89,11 @@
|
|||||||
#define ARDUINOJSON_DEFAULT_NESTING_LIMIT 50
|
#define ARDUINOJSON_DEFAULT_NESTING_LIMIT 50
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Default capacity for DynamicJsonDocument
|
||||||
|
#ifndef ARDUINOJSON_DEFAULT_POOL_SIZE
|
||||||
|
#define ARDUINOJSON_DEFAULT_POOL_SIZE 16384
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // ARDUINOJSON_EMBEDDED_MODE
|
#endif // ARDUINOJSON_EMBEDDED_MODE
|
||||||
|
|
||||||
#ifdef ARDUINO
|
#ifdef ARDUINO
|
||||||
|
@ -45,7 +45,7 @@ class DynamicMemoryPoolBase : public MemoryPool {
|
|||||||
public:
|
public:
|
||||||
enum { EmptyBlockSize = sizeof(EmptyBlock) };
|
enum { EmptyBlockSize = sizeof(EmptyBlock) };
|
||||||
|
|
||||||
DynamicMemoryPoolBase(size_t initialSize = 256)
|
DynamicMemoryPoolBase(size_t initialSize = ARDUINOJSON_DEFAULT_POOL_SIZE)
|
||||||
: _head(NULL), _nextBlockCapacity(initialSize) {}
|
: _head(NULL), _nextBlockCapacity(initialSize) {}
|
||||||
|
|
||||||
~DynamicMemoryPoolBase() {
|
~DynamicMemoryPoolBase() {
|
||||||
|
Reference in New Issue
Block a user