VirtualBox

Changeset 39 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Jan 15, 2007 5:35:58 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
17468
Message:

Fixed state loading.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGM.cpp

    r28 r39  
    16001600        if (pRam->fFlags & MM_RAM_FLAGS_DYNAMIC_ALLOC)
    16011601        {
     1602            bool fPreAlloc = false;
     1603
     1604            rc = CFGMR3QueryBool(CFGMR3GetRoot(pVM), "PreAlloc", &fPreAlloc);
     1605            if (rc == VERR_CFGM_VALUE_NOT_FOUND)
     1606                fPreAlloc = false;
     1607
    16021608            for (unsigned iChunk = 0; iChunk < (pRam->cb >> PGM_DYNAMIC_CHUNK_SHIFT); iChunk++)
    16031609            {
     
    16121618                if (fValidChunk)
    16131619                {
    1614                     rc = pgmr3PhysGrowRange(pVM, pRam->GCPhys + iChunk * PGM_DYNAMIC_CHUNK_SIZE);
    1615                     if (VBOX_FAILURE(rc))
    1616                         return rc;
     1620                    /* The first chunk is always present. (all chunks are present if guest ram is preallocated) */
     1621                    if (    iChunk != 0
     1622                        && !fPreAlloc)
     1623                    {
     1624                        rc = pgmr3PhysGrowRange(pVM, pRam->GCPhys + iChunk * PGM_DYNAMIC_CHUNK_SIZE);
     1625                        if (VBOX_FAILURE(rc))
     1626                            return rc;
     1627                    }
    16171628
    16181629                    Assert(pRam->pavHCChunkHC[iChunk]);
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