VirtualBox

Changeset 25062 in vbox for trunk/include/VBox/HGSMI


Ignore:
Timestamp:
Nov 27, 2009 7:24:14 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
55413
Message:

HGSMI,DevVGA: Use the offset based heap for the hostHeap (resides in VRAM). New staved state version for DevVGA for indicating this change.

File:
1 edited

Legend:

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

    r22652 r25062  
    153153typedef struct _HGSMIHEAP
    154154{
    155     RTHEAPSIMPLE  heap;            /* Heap instance. */
    156     HGSMIAREA     area;            /* Description. */
    157     int           cRefs;           /* Number of heap allocations. */
     155    union
     156    {
     157        RTHEAPSIMPLE  hPtr;         /**< Pointer based heap. */
     158        RTHEAPOFFSET  hOff;         /**< Offset based heap. */
     159    } u;
     160    HGSMIAREA     area;             /**< Description. */
     161    int           cRefs;            /**< Number of heap allocations. */
     162    bool          fOffsetBased;     /**< Set if offset based. */
    158163} HGSMIHEAP;
    159164#pragma pack()
     
    262267                    void *pvBase,
    263268                    HGSMISIZE cbArea,
    264                     HGSMIOFFSET offBase);
     269                    HGSMIOFFSET offBase,
     270                    bool fOffsetBased);
    265271
    266272int HGSMIHeapRelocate (HGSMIHEAP *pHeap,
    267                     void *pvBase,
    268                     uint32_t offHeapHandle,
    269                     uintptr_t offDelta,
    270                     HGSMISIZE cbArea,
    271                     HGSMIOFFSET offBase
    272                     );
     273                       void *pvBase,
     274                       uint32_t offHeapHandle,
     275                       uintptr_t offDelta,
     276                       HGSMISIZE cbArea,
     277                       HGSMIOFFSET offBase,
     278                       bool fOffsetBased);
    273279
    274280void HGSMIHeapSetupUnitialized (HGSMIHEAP *pHeap);
     
    296302DECLINLINE(HGSMIOFFSET) HGSMIHeapHandleLocationOffset(HGSMIHEAP *pHeap)
    297303{
    298     return pHeap->heap != NIL_RTHEAPSIMPLE ? (uint32_t)(pHeap->area.pu8Base - (uint8_t*)pHeap->heap) : HGSMIOFFSET_VOID;
     304    AssertCompile((uintptr_t)NIL_RTHEAPSIMPLE == (uintptr_t)NIL_RTHEAPOFFSET);
     305    return pHeap->u.hPtr != NIL_RTHEAPSIMPLE
     306        ? (HGSMIOFFSET)(pHeap->area.pu8Base - (uint8_t*)pHeap->u.hPtr)
     307        : HGSMIOFFSET_VOID;
    299308}
    300309
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