Skip to content

Fix silent error on large ArrayList startsize#1705

Merged
peace-maker merged 1 commit intomasterfrom
arraylist_startsize_fail
Jan 31, 2022
Merged

Fix silent error on large ArrayList startsize#1705
peace-maker merged 1 commit intomasterfrom
arraylist_startsize_fail

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