VirtualBox

Changeset 18369 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
Mar 27, 2009 3:24:07 AM (16 years ago)
Author:
vboxsync
Message:

GMMR0: Baka tori! Bitmap was a wee bit too small.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/GMMR0.cpp

    r18219 r18369  
    513513    uint32_t            idChunkPrev;
    514514    /** Chunk ID allocation bitmap.
    515      * Bits of allocated IDs are set, free ones are cleared.
     515     * Bits of allocated IDs are set, free ones are clear.
    516516     * The NIL id (0) is marked allocated. */
    517     uint32_t            bmChunkId[(GMM_CHUNKID_LAST + 32) >> 10];
     517    uint32_t            bmChunkId[(GMM_CHUNKID_LAST + 1 + 31) / 32];
    518518} GMM;
    519519/** Pointer to the GMM instance. */
     
    13731373        if (idChunk > NIL_GMM_CHUNKID)
    13741374        {
    1375             AssertMsgReturn(!ASMAtomicBitTestAndSet(&pGMM->bmChunkId[0], idChunk), ("%#x\n", idChunk), NIL_GVM_HANDLE);
     1375            AssertMsgReturn(!ASMAtomicBitTestAndSet(&pGMM->bmChunkId[0], idChunk), ("%#x\n", idChunk), NIL_GMM_CHUNKID);
    13761376            return pGMM->idChunkPrev = idChunk;
    13771377        }
     
    13841384    idChunk = ASMBitFirstClear(&pGMM->bmChunkId[0], GMM_CHUNKID_LAST + 1);
    13851385    AssertMsgReturn(idChunk > NIL_GMM_CHUNKID, ("%#x\n", idChunk), NIL_GVM_HANDLE);
    1386     AssertMsgReturn(!ASMAtomicBitTestAndSet(&pGMM->bmChunkId[0], idChunk), ("%#x\n", idChunk), NIL_GVM_HANDLE);
     1386    AssertMsgReturn(!ASMAtomicBitTestAndSet(&pGMM->bmChunkId[0], idChunk), ("%#x\n", idChunk), NIL_GMM_CHUNKID);
    13871387
    13881388    return pGMM->idChunkPrev = idChunk;
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