VirtualBox

Changeset 30835 in vbox


Ignore:
Timestamp:
Jul 14, 2010 1:33:41 PM (14 years ago)
Author:
vboxsync
Message:

Zero allocated memory

File:
1 edited

Legend:

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

    r30826 r30835  
    32773277    {
    32783278        /*
    3279             * Check that it's not in any of the TLBs.
    3280             */
     3279         * Check that it's not in any of the TLBs.
     3280         */
    32813281        PVM pVM = ((PPGMR3PHYSCHUNKUNMAPCB)pvUser)->pVM;
    32823282        for (unsigned i = 0; i < RT_ELEMENTS(pVM->pgm.s.ChunkR3Map.Tlb.aEntries); i++)
     
    32993299        }
    33003300    }
    3301 
    33023301    return 0;
    33033302}
     
    34553454     */
    34563455#ifdef VBOX_WITH_2X_4GB_ADDR_SPACE
    3457     PPGMCHUNKR3MAP pChunk = (PPGMCHUNKR3MAP)MMR3HeapAlloc(pVM, MM_TAG_PGM_CHUNK_MAPPING, sizeof(*pChunk));
     3456    PPGMCHUNKR3MAP pChunk = (PPGMCHUNKR3MAP)MMR3HeapAllocZ(pVM, MM_TAG_PGM_CHUNK_MAPPING, sizeof(*pChunk));
    34583457#else
    3459     PPGMCHUNKR3MAP pChunk = (PPGMCHUNKR3MAP)MMR3UkHeapAlloc(pVM, MM_TAG_PGM_CHUNK_MAPPING, sizeof(*pChunk), NULL);
     3458    PPGMCHUNKR3MAP pChunk = (PPGMCHUNKR3MAP)MMR3UkHeapAllocZ(pVM, MM_TAG_PGM_CHUNK_MAPPING, sizeof(*pChunk), NULL);
    34603459#endif
    34613460    AssertReturn(pChunk, VERR_NO_MEMORY);
    34623461    pChunk->Core.Key = idChunk;
    34633462    pChunk->AgeCore.Key = pVM->pgm.s.ChunkR3Map.iNow;
    3464     pChunk->iAge = 0;
    3465     pChunk->cRefs = 0;
    3466     pChunk->cPermRefs = 0;
    3467     pChunk->pv = NULL;
    34683463
    34693464    /*
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