VirtualBox

Changeset 37935 in vbox


Ignore:
Timestamp:
Jul 13, 2011 11:12:42 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
72846
Message:

Alignment fixes for 32-bit build employing the electric fence.

Location:
trunk/src/VBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/slirp.c

    r37746 r37935  
    580580    int fNATfailed = 0;
    581581    int rc;
    582     PNATState pData = RTMemAllocZ(sizeof(NATState));
     582    PNATState pData = RTMemAllocZ(RT_ALIGN_Z(sizeof(NATState), sizeof(uint64_t)));
    583583    *ppData = pData;
    584584    if (!pData)
  • trunk/src/VBox/VMM/include/MMInternal.h

    r35346 r37935  
    6464    struct MMHEAP          *pHeap;
    6565#ifdef MMR3HEAP_WITH_STATISTICS
    66 # if HC_ARCH_BITS == 32
    67     /** Aligning the statistics on an 8 byte boundary (for uint64_t and STAM). */
    68     void                   *pvAlignment;
    69 # endif
     66    /** Number of bytes currently allocated. */
     67    size_t                  cbCurAllocated;
    7068    /** Number of allocation. */
    7169    uint64_t                cAllocations;
     
    8078    /** Number of bytes freed. */
    8179    uint64_t                cbFreed;
    82     /** Number of bytes currently allocated. */
    83     size_t                  cbCurAllocated;
    8480#endif
    8581} MMHEAPSTAT;
    8682#if defined(MMR3HEAP_WITH_STATISTICS) && defined(IN_RING3)
    8783AssertCompileMemberAlignment(MMHEAPSTAT, cAllocations, 8);
     84AssertCompileSizeAlignment(MMHEAPSTAT, 8);
    8885#endif
    8986/** Pointer to heap statistics record. */
  • trunk/src/VBox/VMM/include/PDMBlkCacheInternal.h

    r36302 r37935  
    103103{
    104104    /** Pointer to the owning VM instance. */
    105     PVM               pVM;
     105    PVM                 pVM;
    106106    /** Maximum size of the cache in bytes. */
    107     uint32_t          cbMax;
     107    uint32_t            cbMax;
    108108    /** Current size of the cache in bytes. */
    109     uint32_t          cbCached;
     109    uint32_t            cbCached;
    110110    /** Critical section protecting the cache. */
    111     RTCRITSECT        CritSect;
     111    RTCRITSECT          CritSect;
    112112    /** Maximum number of bytes cached. */
    113     uint32_t          cbRecentlyUsedInMax;
     113    uint32_t            cbRecentlyUsedInMax;
    114114    /** Maximum number of bytes in the paged out list .*/
    115     uint32_t          cbRecentlyUsedOutMax;
     115    uint32_t            cbRecentlyUsedOutMax;
    116116    /** Recently used cache entries list */
    117     PDMBLKLRULIST     LruRecentlyUsedIn;
     117    PDMBLKLRULIST       LruRecentlyUsedIn;
    118118    /** Scorecard cache entry list. */
    119     PDMBLKLRULIST     LruRecentlyUsedOut;
     119    PDMBLKLRULIST       LruRecentlyUsedOut;
    120120    /** List of frequently used cache entries */
    121     PDMBLKLRULIST     LruFrequentlyUsed;
     121    PDMBLKLRULIST       LruFrequentlyUsed;
    122122    /** Commit timeout in milli seconds */
    123     uint32_t          u32CommitTimeoutMs;
     123    uint32_t            u32CommitTimeoutMs;
    124124    /** Number of dirty bytes needed to start a commit of the data to the disk. */
    125     uint32_t          cbCommitDirtyThreshold;
     125    uint32_t            cbCommitDirtyThreshold;
    126126    /** Current number of dirty bytes in the cache. */
    127     volatile uint32_t cbDirty;
     127    volatile uint32_t   cbDirty;
     128    /** Flag whether the VM was suspended becaus of an I/O error. */
     129    volatile bool       fIoErrorVmSuspended;
    128130    /** Flag whether a commit is currently in progress. */
    129     volatile bool     fCommitInProgress;
     131    volatile bool       fCommitInProgress;
    130132    /** Commit interval timer */
    131     PTMTIMERR3        pTimerCommit;
     133    PTMTIMERR3          pTimerCommit;
    132134    /** Number of endpoints using the cache. */
    133     uint32_t          cRefs;
     135    uint32_t            cRefs;
    134136    /** List of all users of this cache. */
    135     RTLISTNODE        ListUsers;
     137    RTLISTNODE          ListUsers;
    136138#ifdef VBOX_WITH_STATISTICS
    137139    /** Hit counter. */
    138     STAMCOUNTER       cHits;
     140    STAMCOUNTER         cHits;
    139141    /** Partial hit counter. */
    140     STAMCOUNTER       cPartialHits;
     142    STAMCOUNTER         cPartialHits;
    141143    /** Miss counter. */
    142     STAMCOUNTER       cMisses;
     144    STAMCOUNTER         cMisses;
    143145    /** Bytes read from cache. */
    144     STAMCOUNTER       StatRead;
     146    STAMCOUNTER         StatRead;
    145147    /** Bytes written to the cache. */
    146     STAMCOUNTER       StatWritten;
     148    STAMCOUNTER         StatWritten;
    147149    /** Time spend to get an entry in the AVL tree. */
    148     STAMPROFILEADV    StatTreeGet;
     150    STAMPROFILEADV      StatTreeGet;
    149151    /** Time spend to insert an entry in the AVL tree. */
    150     STAMPROFILEADV    StatTreeInsert;
     152    STAMPROFILEADV      StatTreeInsert;
    151153    /** Time spend to remove an entry in the AVL tree. */
    152     STAMPROFILEADV    StatTreeRemove;
     154    STAMPROFILEADV      StatTreeRemove;
    153155    /** Number of times a buffer could be reused. */
    154     STAMCOUNTER       StatBuffersReused;
    155 #endif
    156     /** Flag whether the VM was suspended becaus of an I/O error. */
    157     volatile bool     fIoErrorVmSuspended;
     156    STAMCOUNTER         StatBuffersReused;
     157#endif
    158158} PDMBLKCACHEGLOBAL;
    159159#ifdef VBOX_WITH_STATISTICS
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