Changeset 39521 in vbox for trunk/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c
- Timestamp:
- Dec 3, 2011 10:59:46 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c
r36555 r39521 392 392 static void rtR0MemObjFreeBSDPhysPageInit(vm_page_t pPage, vm_pindex_t iPage) 393 393 { 394 #if __FreeBSD_version <= 1000000 394 395 pPage->wire_count = 1; 395 396 pPage->pindex = iPage; 396 397 pPage->act_count = 0; 397 pPage->oflags = 0;398 pPage->flags = PG_UNMANAGED;399 398 atomic_add_int(&cnt.v_wire_count, 1); 399 400 #if __FreeBSD_version >= 900040 401 Assert(pPage->oflags & VPO_UNMANAGED != 0); 402 #else 403 Assert(pPage->flags & PG_UNMANAGED != 0); 404 #endif 405 #endif 400 406 } 401 407 … … 409 415 uint32_t cPages = cb >> PAGE_SHIFT; 410 416 vm_paddr_t VmPhysAddrHigh; 417 #if __FreeBSD_version >= 1000001 418 int pFlags = VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED; 419 #endif 411 420 412 421 /* create the object. */ … … 425 434 if (fContiguous) 426 435 { 436 #if __FreeBSD_version >= 1000001 437 vm_page_t pPage = vm_page_alloc_contig(NULL, 0, pFlags, cPages, 0, VmPhysAddrHigh, uAlignment, 0, VM_MEMATTR_DEFAULT); 438 #else 427 439 vm_page_t pPage = vm_phys_alloc_contig(cPages, 0, VmPhysAddrHigh, uAlignment, 0); 440 #endif 428 441 429 442 if (pPage) … … 441 454 for (uint32_t iPage = 0; iPage < cPages; iPage++) 442 455 { 456 #if __FreeBSD_version >= 1000001 457 vm_page_t pPage = vm_page_alloc_contig(NULL, iPage, pFlags, 1, 0, VmPhysAddrHigh, uAlignment, 0, VM_MEMATTR_DEFAULT); 458 #else 443 459 vm_page_t pPage = vm_phys_alloc_contig(1, 0, VmPhysAddrHigh, uAlignment, 0); 460 #endif 444 461 445 462 if (!pPage)
Note:
See TracChangeset
for help on using the changeset viewer.