VirtualBox

Changeset 22888 in vbox


Ignore:
Timestamp:
Sep 9, 2009 10:36:03 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
52144
Message:

vm.h/vm.mac: tweaking.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vm.h

    r22887 r22888  
    118118     *          following it (to grow into and align the struct size).
    119119     *   */
    120     uint32_t                au32Alignment[HC_ARCH_BITS == 32 ? 7 : 3];
     120    uint8_t                 abAlignment1[HC_ARCH_BITS == 32 ? 28 : 12];
    121121
    122122    /** CPUM part. */
     
    211211    } dbgf;
    212212
    213     /** Align at page boundrary. */
    214     uint8_t                 abReserved[960];
     213    /** Align the structure size at page boundrary. */
     214    uint8_t                 abAlignment2[960];
    215215} VMCPU;
    216216
     
    813813    /** Padding - the unions must be aligned on a 64 bytes boundrary and the unions
    814814     *  must start at the same offset on both 64-bit and 32-bit hosts. */
    815     uint32_t                    padding[HC_ARCH_BITS == 32 ? 4+8 : 6];
     815    uint8_t                     abAlignment1[HC_ARCH_BITS == 32 ? 48 : 24];
    816816
    817817    /** CPUM part. */
     
    993993
    994994    /** Padding for aligning the cpu array on a page boundrary. */
    995     uint8_t         abReserved2[2120];
     995    uint8_t         abAlignment2[2120];
    996996
    997997    /* ---- end small stuff ---- */
  • trunk/include/VBox/vm.mac

    r22885 r22888  
    9696    .StatSwitcherTSS        resb STAMPROFILEADV_size
    9797
     98%ifndef HC_ARCH_BITS
     99 %error "Missing HC_ARCH_BITS"
     100%endif
     101%if HC_ARCH_BITS == 32
     102    .abAlignment1           resb 48
     103%else
     104    .abAlignment1           resb 24
     105%endif
     106
    98107    alignb 64
    99108    .cpum                   resb 1472
  • trunk/src/VBox/VMM/testcase/tstVMStructSize.cpp

    r22887 r22888  
    112112    do \
    113113    { \
    114         printf("%s::%s offset %#x (%d) sizeof %d\n",  #strct, #member, (int)RT_OFFSETOF(strct, member), (int)RT_OFFSETOF(strct, member), (int)RT_SIZEOFMEMB(strct, member)); \
     114        printf("info: %s::%s offset %#x (%d) sizeof %d\n",  #strct, #member, (int)RT_OFFSETOF(strct, member), (int)RT_OFFSETOF(strct, member), (int)RT_SIZEOFMEMB(strct, member)); \
    115115    } while (0)
    116116
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