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

domain_create: deliver an Out_of_memory exception if malloc fails #12268

Merged
merged 2 commits into from
Jun 27, 2023

Conversation

avsm
Copy link
Member

@avsm avsm commented May 26, 2023

This is what we do elsewhere in the runtime if a malloc fails, and it helps distinguish the sort of resource exhaustion a domain create is seeing (thread limits vs memory limits)

Spotted during review for #12263

Copy link
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and indeed then consistent with other uses (which either propagate a NULL point or end up calling caml_raise_out_of_memory)

It's probably worth a Changes entry, for that highly obscure discovery that 5.2+ does this and not earlier versions?!

avsm added 2 commits June 22, 2023 13:51
This is what we do elsewhere in the runtime if a malloc fails,
and it helps distinguish the sort of resource exhaustion a domain
create is seeing (thread limits _vs_ memory limits)

Spotted during review for ocaml#12263
@avsm avsm force-pushed the oom-on-domain-create-fail branch from cabe2da to 64ff653 Compare June 22, 2023 12:53
@avsm
Copy link
Member Author

avsm commented Jun 22, 2023

Thanks @dra27; rebased and Changes entry added.

@kayceesrk kayceesrk merged commit b61d85f into ocaml:trunk Jun 27, 2023
10 checks passed
@avsm avsm deleted the oom-on-domain-create-fail branch June 27, 2023 10:47
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.

None yet

3 participants