-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parse json OOM #4514
Comments
Please share the input to check. Please also make sure you compile in release mode. |
The input file is too large to upload(github limit 25MB), but the file is 64MB large. My code is like this:
Is there a way to upload the input file here? |
I would assume using xz would make the file small enough. |
Github doesn't support xz file, I attach a zip file instead. |
Description
I have a string, which is about 10MB in memory. However, when I use json::parse(), the memory cost is 1.6GB.
I wonder if it's a bug?
Reproduction steps
A long string with chinese charater encoded with utf-8.
call
json j = json::parse(str);
can trigger this bug.
Expected vs. actual results
lower memory cost.
Minimal code example
No response
Error messages
No response
Compiler and operating system
windows
Library version
branch: develop, commit hash: ee32bfc
Validation
develop
branch is used.The text was updated successfully, but these errors were encountered: