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

Improve the code used to determine host RAM amount. #901

Closed
wants to merge 1 commit into from

Conversation

lj3954
Copy link
Member

@lj3954 lj3954 commented Jan 8, 2024

Fixes #899

Current RAM check is not very versatile. It functions by printing out text following the colon, preceding the first instance of the character 'G', excluding spaces. This will throw an error on systems with under 1GB or over 1000GB of memory, since 'G' does not follow the first value, and it's not possible to round (or use the greater than/equal to operator) on strings. This resolves that issue, as well as removing the need for rounding in the first place, since free --giga does not print out floating point values.

Copy link
Contributor

@philclifford philclifford left a comment

Choose a reason for hiding this comment

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

LGTM

@flexiondotorg
Copy link
Member

Closed via #986

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.

quickemu create VM error when use 1T RAM
3 participants