Update README.md

This commit is contained in:
Chen 2020-02-17 15:40:52 +08:00 committed by GitHub
parent 88097a250f
commit 42566c6bef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1383,15 +1383,12 @@ By default, the library does not preserve the **insertion order of object elemen
### Memory Release ### Memory Release
We checked with Valgrind and the Clang Sanitizers that there are no memory leaks. We checked with Valgrind and the Address Sanitizer (ASAN) that there are no memory leaks.
If you find that a prasering program with this library does not release memory, please consider these case and it maybe unrelated to this library. If you find that a prasering program with this library does not release memory, please consider the following case and it maybe unrelated to this library.
- Case 1: Your program is compiled with glibc. **Your program is compiled with glibc.** There is a tunable threshold that glibc uses to decide whether to actually return memory to the system or whether to cache it for later reuse. If in your program you make lots of small allocations and those small allocations are not a contiguous block and are presumably below the threshold, then they will not get returned to the OS.
> There is a tunable threshold that glibc uses to decide whether to actually return memory to the system or whether to cache it for later reuse. If in your program you make lots of small allocations and those small allocations are not a contiguous block and are presumably below the threshold, then they will not get returned to the OS.
Here is a related issue [#1924](https://github.com/nlohmann/json/issues/1924). Here is a related issue [#1924](https://github.com/nlohmann/json/issues/1924).
Also you can check your program under windows to ensure whether there are memory leaks.
### Further notes ### Further notes