Changeset 21621 in vbox for trunk/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.c
- Timestamp:
- Jul 15, 2009 4:47:04 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.c
r21497 r21621 148 148 } 149 149 150 case RTR0MEMOBJTYPE_RES_VIRT: 151 { 152 if (pMemSolaris->Core.u.ResVirt.R0Process == NIL_RTR0PROCESS) 153 vmem_xfree(heap_arena, pMemSolaris->Core.pv, pMemSolaris->Core.cb); 154 else 155 AssertFailed(); 156 break; 157 } 158 150 159 /* unused */ 151 160 case RTR0MEMOBJTYPE_LOW: 152 161 case RTR0MEMOBJTYPE_PHYS: 153 case RTR0MEMOBJTYPE_RES_VIRT:154 162 default: 155 163 AssertMsgFailed(("enmType=%d\n", pMemSolaris->Core.enmType)); … … 310 318 int rtR0MemObjNativeReserveKernel(PPRTR0MEMOBJINTERNAL ppMem, void *pvFixed, size_t cb, size_t uAlignment) 311 319 { 312 return VERR_NOT_IMPLEMENTED; 320 PRTR0MEMOBJSOLARIS pMemSolaris; 321 void *pv; 322 323 /* 324 * Use xalloc. 325 */ 326 pv = vmem_xalloc(heap_arena, cb, uAlignment, 0 /*phase*/, 0 /*nocross*/, 327 NULL /*minaddr*/, NULL /*maxaddr*/, VM_SLEEP); 328 if (!pv) 329 return VERR_NO_MEMORY; 330 pMemSolaris = (PRTR0MEMOBJSOLARIS)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_RES_VIRT, pv, cb); 331 if (!pMemSolaris) 332 { 333 vmem_xfree(heap_arena, pv, cb); 334 return VERR_NO_MEMORY; 335 } 336 337 pMemSolaris->Core.u.ResVirt.R0Process = NIL_RTR0PROCESS; 338 *ppMem = &pMemSolaris->Core; 339 return VINF_SUCCESS; 313 340 } 314 341
Note:
See TracChangeset
for help on using the changeset viewer.