forked from Tencent/rapidjson
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change comes up with compile time pre-processor directives to tune the behavior of rapidjson wrt memory consumption. The idea is to allow each module using this library to choose the right defaults based on how it consumes memory and what performance it expects. 1. RAPIDJSON_DEFAULT_ALLOCATOR: If defined allows you to choose CrtAllocator over MemoryPoolAllocator. If it is not defined, chooses MemoryPoolAllocator by default. 2. RAPIDJSON_DEFAULT_STACK_ALLOCATOR: If defined allows you to choose MemoryPoolAllocator over CrtAllocator. If it is not defined, chooses CrtAllocator by default. 3. RAPIDJSON_VALUE_DEFAULT_OBJECT_CAPACITY and RAPIDJSON_VALUE_DEFAULT_ARRAY_CAPACITY: If defined and set to a value, uses that value for default number of objects/array elements to be pre-allocated. If not defined, uses value of 16: the current default. Verified that all tests pass.
- Loading branch information
Showing
1 changed file
with
47 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters