VirtualBox

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


Ignore:
Timestamp:
Mar 23, 2009 3:20:41 PM (16 years ago)
Author:
vboxsync
Message:

PGMR3PhysAllocHandyPages: More release log info when we're running out of memory.

File:
1 edited

Legend:

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

    r18143 r18144  
    30423042    AssertMsgReturn(iClear <= RT_ELEMENTS(pVM->pgm.s.aHandyPages), ("%d", iClear), VERR_INTERNAL_ERROR);
    30433043    Log(("PGMR3PhysAllocateHandyPages: %d -> %d\n", iClear, RT_ELEMENTS(pVM->pgm.s.aHandyPages)));
     3044    int rcAlloc = VINF_SUCCESS;
     3045    int rcSeed  = VINF_SUCCESS;
    30443046    int rc = VMMR3CallR0(pVM, VMMR0_DO_PGM_ALLOCATE_HANDY_PAGES, 0, NULL);
    30453047    while (rc == VERR_GMM_SEED_ME)
    30463048    {
    30473049        void *pvChunk;
    3048         rc = SUPPageAlloc(GMM_CHUNK_SIZE >> PAGE_SHIFT, &pvChunk);
     3050        rcAlloc = rc = SUPPageAlloc(GMM_CHUNK_SIZE >> PAGE_SHIFT, &pvChunk);
    30493051        if (RT_SUCCESS(rc))
    30503052        {
    3051             rc = VMMR3CallR0(pVM, VMMR0_DO_GMM_SEED_CHUNK, (uintptr_t)pvChunk, NULL);
     3053            rcSeed = rc = VMMR3CallR0(pVM, VMMR0_DO_GMM_SEED_CHUNK, (uintptr_t)pvChunk, NULL);
    30523054            if (RT_FAILURE(rc))
    30533055                SUPPageFree(pvChunk, GMM_CHUNK_SIZE >> PAGE_SHIFT);
     
    30763078    else
    30773079    {
    3078         LogRel(("PGM: Failed to procure handy pages, rc=%Rrc cHandyPages=%u\n",
    3079                 rc, pVM->pgm.s.cHandyPages));
     3080        LogRel(("PGM: Failed to procure handy pages; rc=%Rrc rcAlloc=%Rrc rcSeed=%Rrc cHandyPages=%#x\n"
     3081                "     cAllPages=%#x cPrivatePages=%#x cSharedPages=%#x cZeroPages=%#x\n",
     3082                rc, rcSeed, rcAlloc,
     3083                pVM->pgm.s.cHandyPages,
     3084                pVM->pgm.s.cAllPages,
     3085                pVM->pgm.s.cPrivatePages,
     3086                pVM->pgm.s.cSharedPages,
     3087                pVM->pgm.s.cZeroPages));
    30803088        rc = VERR_EM_NO_MEMORY;
    30813089        //rc = VINF_EM_NO_MEMORY;
     
    30863094    AssertMsg(   pVM->pgm.s.cHandyPages == RT_ELEMENTS(pVM->pgm.s.aHandyPages)
    30873095              || rc != VINF_SUCCESS, ("%d rc=%Rrc\n", pVM->pgm.s.cHandyPages, rc));
     3096
    30883097    pgmUnlock(pVM);
    30893098    Assert(rc == VINF_SUCCESS || rc == VINF_EM_NO_MEMORY || rc == VERR_EM_NO_MEMORY);
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