VirtualBox

Changeset 17421 in vbox for trunk/src/VBox/VMM/PGMPhys.cpp


Ignore:
Timestamp:
Mar 5, 2009 8:17:00 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
43832
Message:

PGM,VMM,GMM: handy page allocation and some other fixes.

File:
1 edited

Legend:

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

    r17371 r17421  
    24132413{
    24142414    pgmLock(pVM);
     2415
     2416    /*
     2417     * Allocate more pages, noting down the index of the first new page.
     2418     */
     2419    uint32_t iClear = pVM->pgm.s.cHandyPages;
    24152420    int rc = VMMR3CallR0(pVM, VMMR0_DO_PGM_ALLOCATE_HANDY_PAGES, 0, NULL);
    24162421    if (rc == VERR_GMM_SEED_ME)
     
    24262431        }
    24272432    }
     2433
     2434    /*
     2435     * Clear the pages.
     2436     */
     2437    if (RT_SUCCESS(rc))
     2438    {
     2439        while (iClear < pVM->pgm.s.cHandyPages)
     2440        {
     2441            PGMMPAGEDESC pPage = &pVM->pgm.s.aHandyPages[iClear];
     2442            void *pv;
     2443            rc = pgmPhysPageMapByPageID(pVM, pPage->idPage, pPage->HCPhysGCPhys, &pv);
     2444            AssertLogRelMsgBreak(RT_SUCCESS(rc), ("idPage=%#x HCPhysGCPhys=%RHp rc=%Rrc", pPage->idPage, pPage->HCPhysGCPhys, rc));
     2445            ASMMemZeroPage(pv);
     2446            iClear++;
     2447        }
     2448    }
     2449
     2450/** @todo Do proper VERR_EM_NO_MEMORY reporting. */
    24282451    pgmUnlock(pVM);
    24292452    Assert(rc == VINF_SUCCESS || rc == VINF_EM_NO_MEMORY);
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