VirtualBox

Changeset 19674 in vbox


Ignore:
Timestamp:
May 14, 2009 7:57:59 AM (16 years ago)
Author:
vboxsync
Message:

Use the pgm lock during pgmPoolAlloc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r19628 r19674  
    42134213     *  Assert(!(pVM->pgm.s.fGlobalSyncFlags & PGM_GLOBAL_SYNC_CLEAR_PGM_POOL)); */
    42144214
     4215    pgmLock(pVM);
     4216
    42154217#ifdef PGMPOOL_WITH_CACHE
    42164218    if (pPool->fCacheEnabled)
     
    42194221        if (RT_SUCCESS(rc2))
    42204222        {
     4223            pgmUnlock(pVM);
    42214224            STAM_PROFILE_ADV_STOP(&pPool->StatAlloc, a);
    42224225            LogFlow(("pgmPoolAlloc: cached returns %Rrc *ppPage=%p:{.Key=%RHp, .idx=%d}\n", rc2, *ppPage, (*ppPage)->Core.Key, (*ppPage)->idx));
     
    42364239        if (RT_FAILURE(rc))
    42374240        {
     4241            pgmUnlock(pVM);
    42384242            Log(("pgmPoolAlloc: returns %Rrc (Free)\n", rc));
    42394243            STAM_PROFILE_ADV_STOP(&pPool->StatAlloc, a);
     
    42814285        pPage->iNext = pPool->iFreeHead;
    42824286        pPool->iFreeHead = pPage->idx;
     4287        pgmUnlock(pVM);
    42834288        STAM_PROFILE_ADV_STOP(&pPool->StatAlloc, a);
    42844289        Log(("pgmPoolAlloc: returns %Rrc (Insert)\n", rc3));
     
    43044309
    43054310    *ppPage = pPage;
     4311    pgmUnlock(pVM);
    43064312    LogFlow(("pgmPoolAlloc: returns %Rrc *ppPage=%p:{.Key=%RHp, .idx=%d, .fCached=%RTbool, .fMonitored=%RTbool}\n",
    43074313             rc, pPage, pPage->Core.Key, pPage->idx, pPage->fCached, pPage->fMonitored));
Note: See TracChangeset for help on using the changeset viewer.

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