VirtualBox

Changeset 64111 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Sep 30, 2016 1:46:56 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
111067
Message:

Main: when logging the total/available host RAM size, print both MB and GB for huge values

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/glue/com.cpp

    r62780 r64111  
    312312                vrc = RTSystemQueryAvailableRam(&cbHostRamAvail);
    313313            if (RT_SUCCESS(vrc))
    314                 pfnLog(pReleaseLogger, "Host RAM: %lluMB total, %lluMB available\n",
    315                        cbHostRam / _1M, cbHostRamAvail / _1M);
     314            {
     315                pfnLog(pReleaseLogger, "Host RAM: %lluMB", cbHostRam / _1M);
     316                if (cbHostRam > _2G)
     317                    pfnLog(pReleaseLogger, " (%lld.%lldGB)",
     318                           cbHostRam / _1G, (cbHostRam % _1G) / (_1G / 10));
     319                pfnLog(pReleaseLogger, " total, %lluMB", cbHostRamAvail / _1M);
     320                if (cbHostRamAvail > _2G)
     321                    pfnLog(pReleaseLogger, " (%lld.%lldGB)",
     322                           cbHostRamAvail / _1G, (cbHostRamAvail % _1G) / (_1G / 10));
     323                pfnLog(pReleaseLogger, " available\n");
     324            }
    316325
    317326            /* the package type is interesting for Linux distributions */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette