Skip to content
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

Improve buffer reuse. Check for out of memory error code #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TysonAndre
Copy link
Collaborator

Closes #80 - simdjson_is_valid() and other PHP functions would previously return false when out of memory

Closes #79 - reuse buffers for strings less than 1000000 bytes and 100000 depth. (Assumes the depth rarely changes in callers)
(Otherwise, create a brand new parser instance and only use that instance once, after which the megabytes of memory will be reclaimed)

Closes crazyxman#80 - simdjson_is_valid() and other PHP functions would
previously return false when out of memory

- Related to crazyxman#60 - other php apis (using emalloc instead) will also emit
  fatal errors when out of memory and end the process.

Closes crazyxman#79 - reuse buffers for strings less than 1000000 bytes and
100000 depth. (Assumes the depth rarely changes in callers)
@TysonAndre TysonAndre mentioned this pull request Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant