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

Fix silent error on large ArrayList startsize #1705

Merged
merged 1 commit into from
Jan 31, 2022

Conversation

peace-maker
Copy link
Member

If there isn't enough memory to resize the ArrayList to the startsize on construction, throw an error instead of ignoring the OOM.

Fixes #1551

If there isn't enough memory to resize the ArrayList to the startsize on construction, throw an error instead of ignoring the OOM.

Fixes #1551
@JoinedSenses
Copy link
Contributor

JoinedSenses commented Jan 31, 2022

my only concern with this is that you might not even be freeing memory of stuff that greatly contributes to the OOM.

edit: nevermind, i didnt notice this is during createarray, so it shouldnt matter

@peace-maker peace-maker merged commit f7c54e9 into master Jan 31, 2022
@peace-maker peace-maker deleted the arraylist_startsize_fail branch January 31, 2022 21:07
psychonic pushed a commit that referenced this pull request Mar 20, 2022
If there isn't enough memory to resize the ArrayList to the startsize on construction, throw an error instead of ignoring the OOM.

Fixes #1551

(cherry picked from commit f7c54e9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ArrayList constructor init fail without errors
3 participants