VirtualBox

Changeset 28046 in vbox


Ignore:
Timestamp:
Apr 7, 2010 12:46:12 PM (15 years ago)
Author:
vboxsync
Message:

IMachine's MemoryBalloonSize property now affects running guests as well.

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MachineImpl.cpp

    r28005 r28046  
    12711271}
    12721272
    1273 /** @todo this method should not be public */
    12741273STDMETHODIMP Machine::COMSETTER(MemoryBalloonSize)(ULONG memoryBalloonSize)
    12751274{
     
    12911290    mHWData.backup();
    12921291    mHWData->mMemoryBalloonSize = memoryBalloonSize;
     1292
     1293    /* Propagate the balloon change to the guest if there's an open session. */
     1294    if (mData->mSession.mState != SessionState_Open)
     1295    {
     1296        ComPtr<IInternalSessionControl> directControl;
     1297
     1298        int ret = getDirectControl(&directControl);
     1299        if (ret == S_OK)
     1300        {
     1301            ComPtr<IConsole> mConsole = NULL;
     1302            ComPtr<IGuest>   mGuest = NULL;
     1303
     1304            /* get the associated console; this is a remote call (!) */
     1305            ret = directControl->GetRemoteConsole(mConsole.asOutParam());
     1306            if (ret == S_OK)
     1307            {
     1308                ret = mConsole->COMGETTER(Guest)(mGuest.asOutParam());
     1309                if (ret == S_OK)
     1310                    mGuest->COMSETTER(MemoryBalloonSize)(memoryBalloonSize);
     1311            }
     1312        }
     1313    }
    12931314
    12941315    return S_OK;
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r28036 r28046  
    43464346
    43474347    <attribute name="memoryBalloonSize" type="unsigned long">
    4348       <desc>Initial memory balloon size in megabytes.</desc>
     4348      <desc>Memory balloon size in megabytes.</desc>
    43494349    </attribute>
    43504350
     
    84158415
    84168416    <attribute name="memoryBalloonSize" type="unsigned long">
    8417       <desc>Guest system memory balloon size in megabytes.</desc>
     8417      <desc>Guest system memory balloon size in megabytes (transient property).</desc>
    84188418    </attribute>
    84198419
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