Changeset 26388 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Feb 9, 2010 4:05:42 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxGuest/VBoxGuest.cpp
r25141 r26388 641 641 /* Copy manually as RTGCPHYS is always 64 bits */ 642 642 for (uint32_t j=0;j<VMMDEV_MEMORY_BALLOON_CHUNK_PAGES;j++) 643 req->aPhysPage[j] = pPageDesc[j] ;643 req->aPhysPage[j] = pPageDesc[j] << PAGE_SHIFT; /* PFN_NUMBER is physical page nr, so shift left by 12 to get the physical address */ 644 644 645 645 req->header.size = RT_OFFSETOF(VMMDevChangeMemBalloon, aPhysPage[VMMDEV_MEMORY_BALLOON_CHUNK_PAGES]); … … 677 677 { 678 678 /* deflate */ 679 for (uint32_t _i =pDevExt->MemBalloon.cBalloons;_i>u32BalloonSize;_i--)679 for (uint32_t _i = pDevExt->MemBalloon.cBalloons - 1; _i > u32BalloonSize; _i--) 680 680 { 681 681 uint32_t index = _i - 1; … … 692 692 693 693 /* Copy manually as RTGCPHYS is always 64 bits */ 694 for (uint32_t j =0;j<VMMDEV_MEMORY_BALLOON_CHUNK_PAGES;j++)695 req->aPhysPage[j] = pPageDesc[j] ;694 for (uint32_t j = 0; j < VMMDEV_MEMORY_BALLOON_CHUNK_PAGES; j++) 695 req->aPhysPage[j] = pPageDesc[j] << PAGE_SHIFT; /* PFN_NUMBER is physical page nr, so shift left by 12 to get the physical address */ 696 696 697 697 req->header.size = RT_OFFSETOF(VMMDevChangeMemBalloon, aPhysPage[VMMDEV_MEMORY_BALLOON_CHUNK_PAGES]);
Note:
See TracChangeset
for help on using the changeset viewer.