Changeset 50518 in vbox for trunk/include
- Timestamp:
- Feb 20, 2014 8:32:15 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/HGSMI/HGSMI.h
r50482 r50518 228 228 uintptr_t offDelta, 229 229 HGSMISIZE cbArea, 230 HGSMIOFFSET offBase); 231 232 int HGSMIHeapRestoreMA(HGSMIHEAP *pHeap, 233 void *pvBase, 234 HGSMISIZE cbArea, 230 235 HGSMIOFFSET offBase, 231 const HGSMIENV *pEnv); 236 uint32_t cBlocks, 237 HGSMIOFFSET *paDescriptors, 238 HGSMISIZE cbMaxBlock, 239 HGSMIENV *pEnv); 232 240 233 241 void HGSMIHeapSetupUninitialized (HGSMIHEAP *pHeap); … … 258 266 259 267 #ifdef IN_RING3 260 /* needed for heap relocation*/268 /* Needed for heap relocation: offset of the heap handle relative to the start of heap area. */ 261 269 DECLINLINE(HGSMIOFFSET) HGSMIHeapHandleLocationOffset(HGSMIHEAP *pHeap) 262 270 { 263 #if (__GNUC__ * 100 + __GNUC_MINOR__) < 405 264 /* does not work with gcc-4.5 */ 265 AssertCompile((uintptr_t)NIL_RTHEAPSIMPLE == (uintptr_t)NIL_RTHEAPOFFSET); 266 #endif 267 return pHeap->u.hPtr != NIL_RTHEAPSIMPLE 268 ? (HGSMIOFFSET)(pHeap->area.pu8Base - (uint8_t*)pHeap->u.hPtr) 269 : HGSMIOFFSET_VOID; 271 HGSMIOFFSET offHeapHandle; 272 if (pHeap->u32HeapType == HGSMI_HEAP_TYPE_POINTER) 273 { 274 offHeapHandle = (HGSMIOFFSET)((uintptr_t)pHeap->u.hPtr - (uintptr_t)pHeap->area.pu8Base); 275 } 276 else if (pHeap->u32HeapType == HGSMI_HEAP_TYPE_OFFSET) 277 { 278 offHeapHandle = (HGSMIOFFSET)((uintptr_t)pHeap->u.hOff - (uintptr_t)pHeap->area.pu8Base); 279 } 280 else 281 { 282 offHeapHandle = HGSMIOFFSET_VOID; 283 } 284 return offHeapHandle; 270 285 } 271 286 #endif /* IN_RING3 */
Note:
See TracChangeset
for help on using the changeset viewer.