VirtualBox

Changeset 19735 in vbox


Ignore:
Timestamp:
May 15, 2009 12:50:56 PM (16 years ago)
Author:
vboxsync
Message:

Relax critical alignment requirements a bit.

Location:
trunk/src/VBox/VMM
Files:
6 edited

Legend:

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

    r19719 r19735  
    127127    AssertCompile(sizeof(pVM->em.s) <= sizeof(pVM->em.padding));
    128128    AssertCompile(sizeof(pVM->aCpus[0].em.s.u.FatalLongJump) <= sizeof(pVM->aCpus[0].em.s.u.achPaddingFatalLongJump));
    129     AssertCompileMemberAlignment(EM, CritSectREM, 8);
     129    AssertCompileMemberAlignment(EM, CritSectREM, sizeof(uintptr_t));
    130130
    131131    /*
  • trunk/src/VBox/VMM/IOM.cpp

    r19716 r19735  
    150150    AssertCompileMemberAlignment(VM, iom.s, 32);
    151151    AssertCompile(sizeof(pVM->iom.s) <= sizeof(pVM->iom.padding));
    152     AssertCompileMemberAlignment(IOM, EmtLock, 8);
     152    AssertCompileMemberAlignment(IOM, EmtLock, sizeof(uintptr_t));
    153153
    154154    /*
  • trunk/src/VBox/VMM/PDM.cpp

    r19682 r19735  
    325325    AssertRelease(!(RT_OFFSETOF(VM, pdm.s) & 31));
    326326    AssertRelease(sizeof(pVM->pdm.s) <= sizeof(pVM->pdm.padding));
    327 
     327    AssertCompileMemberAlignment(PDM, CritSect, sizeof(uintptr_t));
    328328    /*
    329329     * Init the structure.
  • trunk/src/VBox/VMM/PDMCritSect.cpp

    r19718 r19735  
    151151    AssertCompile(sizeof(pCritSect->padding) >= sizeof(pCritSect->s));
    152152#endif
    153     Assert(RT_ALIGN_P(pCritSect, 8) == pCritSect);
     153    Assert(RT_ALIGN_P(pCritSect, sizeof(uintptr_t)) == pCritSect);
    154154    return pdmR3CritSectInitOne(pVM, &pCritSect->s, pCritSect, pszName);
    155155}
  • trunk/src/VBox/VMM/PGM.cpp

    r19682 r19735  
    11821182     */
    11831183    AssertCompile(sizeof(pVM->pgm.s) <= sizeof(pVM->pgm.padding));
     1184    AssertCompileMemberAlignment(PGM, CritSect, sizeof(uintptr_t));
    11841185
    11851186    /*
  • trunk/src/VBox/VMM/testcase/tstVMStructSize.cpp

    r19715 r19735  
    293293
    294294    /* TM */
    295     CHECK_MEMBER_ALIGNMENT(TM, EmtLock, 8);
    296     CHECK_MEMBER_ALIGNMENT(TM, VirtualSyncLock, 8);
    297 
    298     CHECK_MEMBER_ALIGNMENT(IOM, EmtLock, 8);
    299     CHECK_MEMBER_ALIGNMENT(EM, CritSectREM, 8);
    300     CHECK_MEMBER_ALIGNMENT(PGM, CritSect, 8);
    301     CHECK_MEMBER_ALIGNMENT(PDM, CritSect, 8);
    302     CHECK_MEMBER_ALIGNMENT(MMHYPERHEAP, Lock, 8);
     295    CHECK_MEMBER_ALIGNMENT(TM, EmtLock, sizeof(uintptr_t));
     296    CHECK_MEMBER_ALIGNMENT(TM, VirtualSyncLock, sizeof(uintptr_t));
     297
     298    CHECK_MEMBER_ALIGNMENT(IOM, EmtLock, sizeof(uintptr_t));
     299    CHECK_MEMBER_ALIGNMENT(EM, CritSectREM, sizeof(uintptr_t));
     300    CHECK_MEMBER_ALIGNMENT(PGM, CritSect, sizeof(uintptr_t));
     301    CHECK_MEMBER_ALIGNMENT(PDM, CritSect, sizeof(uintptr_t));
     302    CHECK_MEMBER_ALIGNMENT(MMHYPERHEAP, Lock, sizeof(uintptr_t));
    303303
    304304    /* hwaccm - 32-bit gcc won't align uint64_t naturally, so check. */
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