Changeset 26350 in vbox for trunk/src/VBox
- Timestamp:
- Feb 9, 2010 9:21:38 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 57438
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/VMMDev/VMMDev.cpp
r26295 r26350 1387 1387 else 1388 1388 { 1389 pRequestHeader->rc = pThis->pDrv->pfnChangeMemoryBalloon(pThis->pDrv, !!memBalloonChange->fInflate, memBalloonChange->cPages, memBalloonChange->aPhysPage); 1389 if (memBalloonChange->fInflate) 1390 pRequestHeader->rc = PGMR3PhysFreeRamPages(PDMDevHlpGetVM(pDevIns), memBalloonChange->cPages, memBalloonChange->aPhysPage); 1391 else 1392 pRequestHeader->rc = VINF_SUCCESS; /* deflating the balloon doesn't require any action; when the reacquired memory is touched, it will be paged back in. */ 1390 1393 } 1391 1394 break; -
trunk/src/VBox/Main/VMMDevInterface.cpp
r26295 r26350 512 512 guest->SetStatistic(pGuestStats->u32CpuId, GuestStatisticType_SampleNumber, sample+1); 513 513 514 return VINF_SUCCESS;515 }516 517 /**518 * Inflate or deflate the memory balloon519 *520 * @returns VBox status code.521 * @param pInterface Pointer to this interface.522 * @param fInflate Inflate or deflate523 * @param cPages Number of physical pages (must be 256 as we allocate in 1 MB chunks)524 * @param aPhysPage Array of physical page addresses525 * @thread The emulation thread.526 */527 DECLCALLBACK(int) vmmdevChangeMemoryBalloon(PPDMIVMMDEVCONNECTOR pInterface, bool fInflate, uint32_t cPages, RTGCPHYS *aPhysPage)528 {529 if ( cPages != VMMDEV_MEMORY_BALLOON_CHUNK_PAGES530 || !aPhysPage)531 return VERR_INVALID_PARAMETER;532 533 Log(("vmmdevChangeMemoryBalloon @todo\n"));534 514 return VINF_SUCCESS; 535 515 } … … 737 717 pData->Connector.pfnReportStatistics = vmmdevReportStatistics; 738 718 pData->Connector.pfnQueryStatisticsInterval = vmmdevQueryStatisticsInterval; 739 pData->Connector.pfnChangeMemoryBalloon = vmmdevChangeMemoryBalloon;740 719 741 720 #ifdef VBOX_WITH_HGCM
Note:
See TracChangeset
for help on using the changeset viewer.