VirtualBox

Changeset 29507 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
May 17, 2010 8:16:18 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
61646
Message:

Skip the first region as it only contains the image file header.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp

    r29479 r29507  
    150150                char *pRegion = (char *)MemInfo.BaseAddress;
    151151
    152                 /* Touch all pages. */
    153                 while (pRegion < (char *)MemInfo.BaseAddress + MemInfo.RegionSize)
     152                /* Skip the first region as it only contains the image file header. */
     153                if (pRegion != (char *)pModule->Info.modBaseAddr)
    154154                {
    155                     char dummy;
    156 
    157                     memcpy(&dummy, pRegion, 1);
    158                     pRegion += PAGE_SIZE;
     155                    /* Touch all pages. */
     156                    while (pRegion < (char *)MemInfo.BaseAddress + MemInfo.RegionSize)
     157                    {
     158                        char dummy;
     159
     160                        memcpy(&dummy, pRegion, 1);
     161                        pRegion += PAGE_SIZE;
     162                    }
    159163                }
    160164                aRegions[idxRegion].GCRegionAddr = (RTGCPTR64)MemInfo.BaseAddress;
Note: See TracChangeset for help on using the changeset viewer.

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