VirtualBox

Changeset 28002 in vbox for trunk/src


Ignore:
Timestamp:
Apr 6, 2010 12:32:01 PM (15 years ago)
Author:
vboxsync
Message:

More changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGMPhys.cpp

    r28001 r28002  
    957957 *
    958958 * @returns VBox status code.
    959  * @param   pVM             The VM handle.
    960  * @param   puBalloonVM     Pointer to VM balloon size (in pages)
    961  * @param   puBalloonAllVMs Pointer to total balloon size of all VMs (in pages)
    962  */
    963 VMMR3DECL(int) PGMR3QueryBalloonSize(PVM pVM, uint64_t *puBalloonVM, uint64_t *puBalloonAllVMs)
     959 * @param   pVM                 The VM handle.
     960 * @param   puVMBalloonSize     Pointer to VM balloon size (in megabytes)
     961 * @param   puTotalBalloonSize  Pointer to total balloon size of all VMs (in megabytes)
     962 */
     963VMMR3DECL(int) PGMR3QueryBalloonSize(PVM pVM, uint64_t *puVMBalloonSize, uint64_t *puTotalBalloonSize)
    964964{
    965965    int rc = VINF_SUCCESS;
    966966
    967     if (puBalloonVM)
    968         *puBalloonVM = pVM->pgm.s.cBalloonedPages;
    969 
    970     if (puBalloonAllVMs)
    971     {
    972         *puBalloonAllVMs = 0;
    973         rc = GMMR3QueryTotalBalloonSize(pVM, puBalloonAllVMs);
     967    if (puVMBalloonSize)
     968        *puVMBalloonSize = pVM->pgm.s.cBalloonedPages * _4K / _1M;
     969
     970    if (puTotalBalloonSize)
     971    {
     972        *puTotalBalloonSize = 0;
     973        rc = GMMR3QueryTotalBalloonSize(pVM, puTotalBalloonSize);
    974974        AssertRC(rc);
     975        *puTotalBalloonSize = *puTotalBalloonSize * _4K / _1M;
    975976    }
    976977
Note: See TracChangeset for help on using the changeset viewer.

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