* Prevent `long` overflow when VM has a very large amount of memory. Resulted in XenCenter hanging with a significant memory leak.
* Remove unused `label` parameter from `LabelShouldBeShown`
* Use `double` for increment variable when calculating increments in `ShinyBar`
* Use `Debug.Assert` call to avoid issues with `DrawGrid` in `ShinyBar`
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
- Memory Tab uses GB units for values greater or equal to 1 GB, otherwise show in MB;
- Search Tab displays values in GB or MB in the same as the Memory Tab (e.g. 512 MB of 1 GB, 256 MB of 512 MB, 2.5 GB of 16 GB).
- The shiny bar present in the Memory Tab and in Memory Settings dialog shows the scaling in the following way: If smaller than 1 GB, then show as before, else show only labels with values multiples of half a GB.
- The units used in Memory Setting Dialog are set depending on the static_max. If it is greater or equal to 1 GB, then the units are GB, else MB. The user does not have the possibility of changing them.