VirtualBox

Changeset 6527 in vbox


Ignore:
Timestamp:
Jan 28, 2008 2:42:18 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
27553
Message:

Free.iNext should be 16 bit and use UINT16_MAX instead of UINT32_MAX.

File:
1 edited

Legend:

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

    r6333 r6527  
    225225    struct GMMPAGEFREE
    226226    {
    227         /** The index of the next page in the free list. */
    228         uint32_t    iNext;
     227        /** The index of the next page in the free list. UINT16_MAX is NIL. */
     228        uint16_t    iNext;
    229229        /** Reserved. Checksum or something? */
    230         uint32_t    u30Reserved : 30;
     230        uint16_t    u16Reserved0;
     231        /** Reserved. Checksum or something? */
     232        uint32_t    u30Reserved1 : 30;
    231233        /** The page state. */
    232234        uint32_t    u2State : 2;
     
    268270    struct GMMPAGEFREE
    269271    {
    270         /** The index of the next page in the free list. */
    271         uint32_t    iNext : 30;
     272        /** The index of the next page in the free list. UINT16_MAX is NIL. */
     273        uint32_t    iNext : 16;
     274        /** Reserved. Checksum or something? */
     275        uint32_t    u14Reserved : 14;
    272276        /** The page state. */
    273277        uint32_t    u2State : 2;
     
    275279#endif
    276280} GMMPAGE;
     281AssertCompileSize(GMMPAGE, sizeof(RTHCUINTPTR));
    277282/** Pointer to a GMMPAGE. */
    278283typedef GMMPAGE *PGMMPAGE;
     
    594599         * Check and see if RTR0MemObjAllocPhysNC works.
    595600         */
     601#if 0 /* later */
    596602        RTR0MEMOBJ MemObj;
    597603        rc = RTR0MemObjAllocPhysNC(&MemObj, _64K, NIL_RTHCPHYS);
     
    605611        else
    606612            SUPR0Printf("GMMR0Init: RTR0MemObjAllocPhysNC(,64K,Any) -> %d!\n", rc);
     613#else
     614        pGMM->fLegacyMode = true;
     615#endif
    607616
    608617        g_pGMM = pGMM;
     
    637646
    638647    /*
    639      * Undo what init did and free any resources we've acquired.
     648     * Undo what init did and free all the resources we've acquired.
    640649     */
    641650    /* Destroy the fundamentals. */
     
    14021411        }
    14031412        pChunk->aPages[RT_ELEMENTS(pChunk->aPages) - 1].Free.u2State = GMM_PAGE_STATE_FREE;
    1404         /* XXX sizeof(iNext) < 32, please fix this!! */
    1405         pChunk->aPages[RT_ELEMENTS(pChunk->aPages) - 1].Free.iNext = UINT32_MAX;
     1413        pChunk->aPages[RT_ELEMENTS(pChunk->aPages) - 1].Free.iNext = UINT16_MAX;
    14061414
    14071415        /*
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