Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Try to provide better error messages when user's machine is out of memory #56

Closed
LefterisJP opened this issue May 14, 2015 · 2 comments
Closed

Comments

@LefterisJP
Copy link
Contributor

Memory mapped file will not gracefully provide an error if the user's machine runs out of memory. It will cause a BUS error.

See ethereum/aleth#806 (comment)

@LefterisJP LefterisJP changed the title Try to provide better error messages when user is out of memory Try to provide better error messages when user's machine is out of memory May 14, 2015
@fjl
Copy link
Contributor

fjl commented May 15, 2015

This should be extended to also handle cases where there is not enough disk space.

@LefterisJP
Copy link
Contributor Author

This is what this PR: #57 tries to do.

It's not returning error codes since we assume that all of these cases are fatal and really bad. There is only one error code. Null pointer for failure. But now there is at least a string printed with a critical error message in each failing case.

The string could somehow be written in a buffer and returned so that each implementation can choose how to show it to the user but that would require an API change.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants