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

Safe Memory Allocation #114

Open
DavePearce opened this issue Sep 11, 2022 · 0 comments
Open

Safe Memory Allocation #114

DavePearce opened this issue Sep 11, 2022 · 0 comments

Comments

@DavePearce
Copy link
Member

At the moment, any code (be it in a function, method or other) can fail with an out-of-memory exception. Its not clear how best to resolve this:

  • We could update the return type of anything which could cause a memory allocation. But, even a simple assignment can cause a memory allocation (i.e. its if a copy)!
  • Another option is to have an exception mechanism for certain runtime faults like this. Then, we can catch such exceptions and deal with them for error recovery.

See this RFC in Rust, as one possible example.

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

No branches or pull requests

1 participant