Changeset 4675 in vbox for trunk/src/VBox/Additions/WINNT/VBoxGuest/VBoxGuest.cpp
- Timestamp:
- Sep 10, 2007 3:54:41 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxGuest/VBoxGuest.cpp
r4673 r4675 550 550 { 551 551 /* deflate */ 552 for (uint32_t i=pDevExt->MemBalloon.cBalloons-1;i>=u32BalloonSize;i--) 553 { 554 PMDL pMdl = pDevExt->MemBalloon.paMdlMemBalloon[i]; 552 for (uint32_t _i=pDevExt->MemBalloon.cBalloons;_i>u32BalloonSize;_i--) 553 { 554 uint32_t index = _i - 1; 555 PMDL pMdl = pDevExt->MemBalloon.paMdlMemBalloon[index]; 555 556 556 557 Assert(pMdl); 557 558 if (pMdl) 558 559 { 560 #ifdef TARGET_NT4 559 561 PVOID pvBalloon = MmGetMdlVirtualAddress(pMdl); 562 #endif 560 563 561 564 PPFN_NUMBER pPageDesc = MmGetMdlPfnArray(pMdl); … … 576 579 } 577 580 578 dprintf(("VBoxGuest::VBoxGuestSetBalloonSize %d MB free chunk at %x\n", i, pvBalloon));579 580 581 /* Free the ballooned memory */ 581 582 #ifndef TARGET_NT4 583 dprintf(("VBoxGuest::VBoxGuestSetBalloonSize %d MB free chunk at %x\n", index, pMdl)); 582 584 MmFreePagesFromMdl(pMdl); 583 585 ExFreePool(pMdl); 584 586 #else 587 dprintf(("VBoxGuest::VBoxGuestSetBalloonSize %d MB free chunk at %x\n", index, pvBalloon)); 585 588 MmUnlockPages (pMdl); 586 589 IoFreeMdl (pMdl); … … 588 591 #endif 589 592 590 pDevExt->MemBalloon.paMdlMemBalloon[i ] = NULL;593 pDevExt->MemBalloon.paMdlMemBalloon[index] = NULL; 591 594 pDevExt->MemBalloon.cBalloons--; 592 595 }
Note:
See TracChangeset
for help on using the changeset viewer.