-
Notifications
You must be signed in to change notification settings - Fork 662
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
qemu backend tries to allocate millions of megabytes of memory #677
Comments
From
So qemu's memory resolution is megabytes. We will floor when an exact match is not possible. |
Also interesting: https://libvirt.org/formatdomain.html#elementsMemoryAllocation In particular
|
This completes the switch to MemorySize (compiling and passing tests). Fixes #677.
681: Cleanse backend memory args r=Saviq a=ricab Fixes #677 On investigation, back-end tools use slightly different formats to represent digital info sizes (bytes). So, our previous assumption that a *bytes string* would be correctly interpreted everywhere is not actually true. IOW, neither plain strings nor plain numbers are adequate to convey memory sizes uniformly, so the earlier *shortcut implementation* falls short. This PR encapsulates memory sizes in a dedicated type: `MemorySize`. This type does the necessary arithmetic, but it is the responsibility of each (internal) back-end implementation to derive the string representation they need (unit and unit representation). Co-authored-by: Ricardo Abreu <[email protected]>
Between #654 and #650 the qemu backend started allocating petabytes of memory... Failing, obviously.
The text was updated successfully, but these errors were encountered: