File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,19 @@ concept Allocator {
52
52
\endcode
53
53
*/
54
54
55
+
56
+ /* ! \def RAPIDJSON_ALLOCATOR_DEFUALT_CHUNK_CAPACITY
57
+ \ingroup RAPIDJSON_CONFIG
58
+ \brief User-defined kDefaultChunkCapacity definition.
59
+
60
+ User can define this as any \c size that is a power of 2.
61
+ */
62
+
63
+ #ifndef RAPIDJSON_ALLOCATOR_DEFAULT_CHUNK_CAPACITY
64
+ #define RAPIDJSON_ALLOCATOR_DEFAULT_CHUNK_CAPACITY (64 * 1024 )
65
+ #endif
66
+
67
+
55
68
// /////////////////////////////////////////////////////////////////////////////
56
69
// CrtAllocator
57
70
@@ -248,7 +261,7 @@ class MemoryPoolAllocator {
248
261
return false ;
249
262
}
250
263
251
- static const int kDefaultChunkCapacity = 64 * 1024 ; // !< Default chunk capacity.
264
+ static const int kDefaultChunkCapacity = RAPIDJSON_ALLOCATOR_DEFAULT_CHUNK_CAPACITY ; // !< Default chunk capacity.
252
265
253
266
// ! Chunk header for perpending to each chunk.
254
267
/* ! Chunks are stored as a singly linked list.
You can’t perform that action at this time.
0 commit comments