Changeset 91478 in vbox for trunk/src/VBox
- Timestamp:
- Sep 29, 2021 11:36:54 PM (3 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/include/internal/memobj.h
r91446 r91478 217 217 } u; 218 218 219 #if defined(DEBUG) 220 /** Allocation tag string. */ 221 const char *pszTag; 222 #endif 219 223 } RTR0MEMOBJINTERNAL; 220 224 … … 497 501 DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(PRTR0MEMOBJINTERNAL pMem, size_t iPage); 498 502 499 DECLHIDDEN(PRTR0MEMOBJINTERNAL) rtR0MemObjNew(size_t cbSelf, RTR0MEMOBJTYPE enmType, void *pv, size_t cb );503 DECLHIDDEN(PRTR0MEMOBJINTERNAL) rtR0MemObjNew(size_t cbSelf, RTR0MEMOBJTYPE enmType, void *pv, size_t cb, const char *pszTag); 500 504 DECLHIDDEN(void) rtR0MemObjDelete(PRTR0MEMOBJINTERNAL pMem); 501 505 DECLHIDDEN(int) rtR0MemObjFallbackAllocLarge(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, size_t cbLargePage, uint32_t fFlags, -
trunk/src/VBox/Runtime/r0drv/darwin/memobj-r0drv-darwin.cpp
r91446 r91478 738 738 * Create the IPRT memory object. 739 739 */ 740 PRTR0MEMOBJDARWIN pMemDarwin = (PRTR0MEMOBJDARWIN)rtR0MemObjNew(sizeof(*pMemDarwin), enmType, pv, cb );740 PRTR0MEMOBJDARWIN pMemDarwin = (PRTR0MEMOBJDARWIN)rtR0MemObjNew(sizeof(*pMemDarwin), enmType, pv, cb, NULL); 741 741 if (pMemDarwin) 742 742 { … … 964 964 * Create the IPRT memory object. 965 965 */ 966 PRTR0MEMOBJDARWIN pMemDarwin = (PRTR0MEMOBJDARWIN)rtR0MemObjNew(sizeof(*pMemDarwin), RTR0MEMOBJTYPE_PHYS, NULL, cb );966 PRTR0MEMOBJDARWIN pMemDarwin = (PRTR0MEMOBJDARWIN)rtR0MemObjNew(sizeof(*pMemDarwin), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL); 967 967 if (pMemDarwin) 968 968 { … … 1023 1023 * Create the IPRT memory object. 1024 1024 */ 1025 PRTR0MEMOBJDARWIN pMemDarwin = (PRTR0MEMOBJDARWIN)rtR0MemObjNew(sizeof(*pMemDarwin), RTR0MEMOBJTYPE_LOCK, pv, cb );1025 PRTR0MEMOBJDARWIN pMemDarwin = (PRTR0MEMOBJDARWIN)rtR0MemObjNew(sizeof(*pMemDarwin), RTR0MEMOBJTYPE_LOCK, pv, cb, NULL); 1026 1026 if (pMemDarwin) 1027 1027 { … … 1053 1053 * Create the IPRT memory object. 1054 1054 */ 1055 PRTR0MEMOBJDARWIN pMemDarwin = (PRTR0MEMOBJDARWIN)rtR0MemObjNew(sizeof(*pMemDarwin), RTR0MEMOBJTYPE_LOCK, pv, cb );1055 PRTR0MEMOBJDARWIN pMemDarwin = (PRTR0MEMOBJDARWIN)rtR0MemObjNew(sizeof(*pMemDarwin), RTR0MEMOBJTYPE_LOCK, pv, cb, NULL); 1056 1056 if (pMemDarwin) 1057 1057 { … … 1200 1200 */ 1201 1201 PRTR0MEMOBJDARWIN pMemDarwin = (PRTR0MEMOBJDARWIN)rtR0MemObjNew(sizeof(*pMemDarwin), RTR0MEMOBJTYPE_MAPPING, 1202 pv, cbSub ? cbSub : pMemToMap->cb );1202 pv, cbSub ? cbSub : pMemToMap->cb, NULL); 1203 1203 if (pMemDarwin) 1204 1204 { … … 1292 1292 */ 1293 1293 PRTR0MEMOBJDARWIN pMemDarwin = (PRTR0MEMOBJDARWIN)rtR0MemObjNew(sizeof(*pMemDarwin), RTR0MEMOBJTYPE_MAPPING, 1294 pv, cbSub ? cbSub : pMemToMap->cb );1294 pv, cbSub ? cbSub : pMemToMap->cb, NULL); 1295 1295 if (pMemDarwin) 1296 1296 { -
trunk/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c
r91446 r91478 364 364 DECLHIDDEN(int) rtR0MemObjNativeAllocPage(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable) 365 365 { 366 PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), 367 RTR0MEMOBJTYPE_PAGE, NULL, cb); 366 PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_PAGE, NULL, cb, NULL); 368 367 if (!pMemFreeBSD) 369 368 return VERR_NO_MEMORY; … … 390 389 DECLHIDDEN(int) rtR0MemObjNativeAllocLow(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable) 391 390 { 392 PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), 393 RTR0MEMOBJTYPE_LOW, NULL, cb); 391 PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_LOW, NULL, cb, NULL); 394 392 if (!pMemFreeBSD) 395 393 return VERR_NO_MEMORY; … … 409 407 DECLHIDDEN(int) rtR0MemObjNativeAllocCont(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable) 410 408 { 411 PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), 412 RTR0MEMOBJTYPE_CONT, NULL, cb); 409 PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_CONT, NULL, cb, NULL); 413 410 if (!pMemFreeBSD) 414 411 return VERR_NO_MEMORY; … … 436 433 437 434 /* create the object. */ 438 PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), 439 enmType, NULL, cb); 435 PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), enmType, NULL, cb, NULL); 440 436 if (!pMemFreeBSD) 441 437 return VERR_NO_MEMORY; … … 490 486 491 487 /* create the object. */ 492 PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_PHYS, NULL, cb );488 PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL); 493 489 if (!pMemFreeBSD) 494 490 return VERR_NO_MEMORY; … … 514 510 515 511 /* create the object. */ 516 PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_LOCK, (void *)AddrStart, cb); 512 PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_LOCK, 513 (void *)AddrStart, cb, NULL); 517 514 if (!pMemFreeBSD) 518 515 return VERR_NO_MEMORY; … … 587 584 * Create the object. 588 585 */ 589 PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_RES_VIRT, NULL, cb); 586 PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_RES_VIRT, 587 NULL, cb, NULL); 590 588 if (!pMemFreeBSD) 591 589 return VERR_NO_MEMORY; … … 698 696 AssertMsg(rc == KERN_SUCCESS, ("%#x\n", rc)); 699 697 700 PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(RTR0MEMOBJFREEBSD), 701 RTR0MEMOBJTYPE_MAPPING, 702 (void *)Addr, 703 cbSub); 698 PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(RTR0MEMOBJFREEBSD), RTR0MEMOBJTYPE_MAPPING, 699 (void *)Addr, cbSub, NULL); 704 700 if (pMemFreeBSD) 705 701 { … … 788 784 * Create a mapping object for it. 789 785 */ 790 PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(RTR0MEMOBJFREEBSD), 791 RTR0MEMOBJTYPE_MAPPING, 792 (void *)AddrR3, 793 pMemToMap->cb); 786 PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(RTR0MEMOBJFREEBSD), RTR0MEMOBJTYPE_MAPPING, 787 (void *)AddrR3, pMemToMap->cb, NULL); 794 788 if (pMemFreeBSD) 795 789 { -
trunk/src/VBox/Runtime/r0drv/haiku/memobj-r0drv-haiku.c
r91446 r91478 204 204 /* Create the object. */ 205 205 PRTR0MEMOBJHAIKU pMemHaiku; 206 pMemHaiku = (PRTR0MEMOBJHAIKU)rtR0MemObjNew(sizeof(RTR0MEMOBJHAIKU), type, NULL, cb );206 pMemHaiku = (PRTR0MEMOBJHAIKU)rtR0MemObjNew(sizeof(RTR0MEMOBJHAIKU), type, NULL, cb, NULL); 207 207 if (RT_UNLIKELY(!pMemHaiku)) 208 208 return VERR_NO_MEMORY; … … 290 290 291 291 /* Create the object. */ 292 PRTR0MEMOBJHAIKU pMemHaiku = (PRTR0MEMOBJHAIKU)rtR0MemObjNew(sizeof(*pMemHaiku), RTR0MEMOBJTYPE_PHYS, NULL, cb );292 PRTR0MEMOBJHAIKU pMemHaiku = (PRTR0MEMOBJHAIKU)rtR0MemObjNew(sizeof(*pMemHaiku), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL); 293 293 if (!pMemHaiku) 294 294 return VERR_NO_MEMORY; … … 328 328 329 329 /* Create the object. */ 330 PRTR0MEMOBJHAIKU pMemHaiku = (PRTR0MEMOBJHAIKU)rtR0MemObjNew(sizeof(*pMemHaiku), RTR0MEMOBJTYPE_LOCK, pvStart, cb );330 PRTR0MEMOBJHAIKU pMemHaiku = (PRTR0MEMOBJHAIKU)rtR0MemObjNew(sizeof(*pMemHaiku), RTR0MEMOBJTYPE_LOCK, pvStart, cb, NULL); 331 331 if (RT_UNLIKELY(!pMemHaiku)) 332 332 return VERR_NO_MEMORY; … … 465 465 /* Create the object. */ 466 466 pMemHaiku = (PRTR0MEMOBJHAIKU)rtR0MemObjNew(sizeof(RTR0MEMOBJHAIKU), RTR0MEMOBJTYPE_MAPPING, pvMap, 467 pMemToMapHaiku->Core.cb );467 pMemToMapHaiku->Core.cb, NULL); 468 468 if (RT_UNLIKELY(!pMemHaiku)) 469 469 return VERR_NO_MEMORY; -
trunk/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
r91477 r91478 347 347 * the page pointer array. 348 348 */ 349 PRTR0MEMOBJLNX pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJLNX, apPages[cPages]), enmType, NULL, cb); 349 PRTR0MEMOBJLNX pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJLNX, apPages[cPages]), enmType, 350 NULL, cb, NULL); 350 351 if (!pMemLnx) 351 352 return VERR_NO_MEMORY; … … 1167 1168 AssertMsgReturn(PhysAddr == Phys, ("%#llx\n", (unsigned long long)Phys), VERR_ADDRESS_TOO_BIG); 1168 1169 1169 pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(sizeof(*pMemLnx), RTR0MEMOBJTYPE_PHYS, NULL, cb );1170 pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(sizeof(*pMemLnx), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL); 1170 1171 if (!pMemLnx) 1171 1172 { … … 1211 1212 * Allocate the memory object and a temporary buffer for the VMAs. 1212 1213 */ 1213 pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJLNX, apPages[cPages]), RTR0MEMOBJTYPE_LOCK, (void *)R3Ptr, cb); 1214 pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJLNX, apPages[cPages]), RTR0MEMOBJTYPE_LOCK, 1215 (void *)R3Ptr, cb, NULL); 1214 1216 if (!pMemLnx) 1215 1217 { … … 1380 1382 * Allocate the memory object. 1381 1383 */ 1382 pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJLNX, apPages[cPages]), RTR0MEMOBJTYPE_LOCK, pv, cb );1384 pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJLNX, apPages[cPages]), RTR0MEMOBJTYPE_LOCK, pv, cb, NULL); 1383 1385 if (!pMemLnx) 1384 1386 { … … 1471 1473 if (pv) 1472 1474 { 1473 PRTR0MEMOBJLNX pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(sizeof(*pMemLnx), RTR0MEMOBJTYPE_RES_VIRT, pv, cb );1475 PRTR0MEMOBJLNX pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(sizeof(*pMemLnx), RTR0MEMOBJTYPE_RES_VIRT, pv, cb, NULL); 1474 1476 if (pMemLnx) 1475 1477 { … … 1524 1526 } 1525 1527 1526 pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(sizeof(*pMemLnx), RTR0MEMOBJTYPE_RES_VIRT, pv, cb );1528 pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(sizeof(*pMemLnx), RTR0MEMOBJTYPE_RES_VIRT, pv, cb, NULL); 1527 1529 if (!pMemLnx) 1528 1530 { … … 1558 1560 if (!cbSub) 1559 1561 cbSub = pMemLnxToMap->Core.cb - offSub; 1560 pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(sizeof(*pMemLnx), RTR0MEMOBJTYPE_MAPPING, NULL, cbSub );1562 pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(sizeof(*pMemLnx), RTR0MEMOBJTYPE_MAPPING, NULL, cbSub, NULL); 1561 1563 if (pMemLnx) 1562 1564 { … … 1732 1734 if (cbSub == 0) 1733 1735 cbSub = pMemLnxToMap->Core.cb; 1734 pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(sizeof(*pMemLnx), RTR0MEMOBJTYPE_MAPPING, NULL, cbSub );1736 pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(sizeof(*pMemLnx), RTR0MEMOBJTYPE_MAPPING, NULL, cbSub, NULL); 1735 1737 if (pMemLnx) 1736 1738 { -
trunk/src/VBox/Runtime/r0drv/memobj-r0drv.cpp
r91446 r91478 55 55 * @param pv The memory object mapping. 56 56 * @param cb The size of the memory object. 57 */ 58 DECLHIDDEN(PRTR0MEMOBJINTERNAL) rtR0MemObjNew(size_t cbSelf, RTR0MEMOBJTYPE enmType, void *pv, size_t cb) 57 * @param pszTag The tag string. 58 */ 59 DECLHIDDEN(PRTR0MEMOBJINTERNAL) rtR0MemObjNew(size_t cbSelf, RTR0MEMOBJTYPE enmType, void *pv, size_t cb, const char *pszTag) 59 60 { 60 61 PRTR0MEMOBJINTERNAL pNew; … … 79 80 pNew->cb = cb; 80 81 pNew->pv = pv; 82 #ifdef DEBUG 83 pNew->pszTag = pszTag; 84 #else 85 RT_NOREF_PV(pszTag); 86 #endif 81 87 } 82 88 return pNew; -
trunk/src/VBox/Runtime/r0drv/netbsd/memobj-r0drv-netbsd.c
r91446 r91478 233 233 DECLHIDDEN(int) rtR0MemObjNativeAllocPage(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable) 234 234 { 235 PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), 236 RTR0MEMOBJTYPE_PAGE, NULL, cb); 235 PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_PAGE, NULL, cb, NULL); 237 236 if (!pMemNetBSD) 238 237 return VERR_NO_MEMORY; … … 265 264 DECLHIDDEN(int) rtR0MemObjNativeAllocLow(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable) 266 265 { 267 PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), 268 RTR0MEMOBJTYPE_LOW, NULL, cb); 266 PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_LOW, NULL, cb, NULL); 269 267 if (!pMemNetBSD) 270 268 return VERR_NO_MEMORY; … … 284 282 DECLHIDDEN(int) rtR0MemObjNativeAllocCont(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable) 285 283 { 286 PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), 287 RTR0MEMOBJTYPE_CONT, NULL, cb); 284 PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_CONT, NULL, cb, NULL); 288 285 if (!pMemNetBSD) 289 286 return VERR_NO_MEMORY; … … 309 306 310 307 /* create the object. */ 311 PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), 312 enmType, NULL, cb); 308 PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), enmType, NULL, cb, NULL); 313 309 if (!pMemNetBSD) 314 310 return VERR_NO_MEMORY; … … 358 354 359 355 /* create the object. */ 360 PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_PHYS, NULL, cb );356 PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL); 361 357 if (!pMemNetBSD) 362 358 return VERR_NO_MEMORY; … … 374 370 DECLHIDDEN(int) rtR0MemObjNativeLockUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR R3Ptr, size_t cb, uint32_t fAccess, RTR0PROCESS R0Process) 375 371 { 376 PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_LOCK, (void *)R3Ptr, cb );372 PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_LOCK, (void *)R3Ptr, cb, NULL); 377 373 if (!pMemNetBSD) 378 374 return VERR_NO_MEMORY; … … 398 394 { 399 395 /* Kernel memory (always?) wired; all memory allocated by vbox code is? */ 400 PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_LOCK, pv, cb );396 PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_LOCK, pv, cb, NULL); 401 397 if (!pMemNetBSD) 402 398 return VERR_NO_MEMORY; … … 417 413 } 418 414 419 PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_RES_VIRT, NULL, cb );415 PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_RES_VIRT, NULL, cb, NULL); 420 416 if (!pMemNetBSD) 421 417 return VERR_NO_MEMORY; … … 462 458 size_t sz = cbSub > 0 ? cbSub : pMemNetBSD0->Core.cb; 463 459 464 PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_MAPPING, NULL, sz );460 PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_MAPPING, NULL, sz, NULL); 465 461 466 462 vaddr_t virt = uvm_km_alloc(kernel_map, sz, uAlignment, -
trunk/src/VBox/Runtime/r0drv/nt/memobj-r0drv-nt.cpp
r91446 r91478 280 280 #endif 281 281 282 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PAGE, pv, cb );282 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PAGE, pv, cb, NULL); 283 283 if (pMemNt) 284 284 { … … 330 330 * Create the IPRT memory object. 331 331 */ 332 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PAGE, pv, cb );332 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PAGE, pv, cb, NULL); 333 333 if (pMemNt) 334 334 { … … 438 438 * Create the memory object. 439 439 */ 440 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PAGE, pv, cb );440 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PAGE, pv, cb, pszTag); 441 441 if (pMemNt) 442 442 { … … 522 522 if (pv) 523 523 { 524 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_LOW, pv, cb );524 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_LOW, pv, cb, NULL); 525 525 if (pMemNt) 526 526 { … … 603 603 #endif 604 604 605 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_CONT, pv, cb );605 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_CONT, pv, cb, NULL); 606 606 if (pMemNt) 607 607 { … … 663 663 if (iPage >= cPages) 664 664 { 665 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PHYS, NULL, cb );665 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL); 666 666 if (pMemNt) 667 667 { … … 681 681 } 682 682 683 /** @todo684 * For large page allocations use MM_ALLOCATE_FAST_LARGE_PAGES ...685 * MM_ALLOCATE_REQUIRE_CONTIGUOUS_CHUNKS686 */687 688 683 return rtR0MemObjNativeAllocContEx(ppMem, cb, false, PhysHighest, uAlignment); 689 684 } … … 703 698 if (MmGetMdlByteCount(pMdl) >= cb) 704 699 { 705 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PHYS_NC, NULL, cb );700 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PHYS_NC, NULL, cb, NULL); 706 701 if (pMemNt) 707 702 { … … 736 731 * Create the IPRT memory object. 737 732 */ 738 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PHYS, NULL, cb );733 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL); 739 734 if (pMemNt) 740 735 { … … 772 767 return VERR_OUT_OF_RANGE; 773 768 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJNT, apMdls[cMdls]), 774 RTR0MEMOBJTYPE_LOCK, pv, cb );769 RTR0MEMOBJTYPE_LOCK, pv, cb, NULL); 775 770 if (!pMemNt) 776 771 return VERR_NO_MEMORY; … … 1007 1002 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew( !offSub && !cbSub 1008 1003 ? sizeof(*pMemNt) : RT_UOFFSETOF_DYN(RTR0MEMOBJNT, apMdls[1]), 1009 RTR0MEMOBJTYPE_MAPPING, pv, pMemNtToMap->Core.cb );1004 RTR0MEMOBJTYPE_MAPPING, pv, pMemNtToMap->Core.cb, NULL); 1010 1005 if (pMemNt) 1011 1006 { … … 1062 1057 { 1063 1058 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_MAPPING, pv, 1064 pMemNtToMap->Core.cb );1059 pMemNtToMap->Core.cb, NULL); 1065 1060 if (pMemNt) 1066 1061 { -
trunk/src/VBox/Runtime/r0drv/os2/memobj-r0drv-os2.cpp
r91446 r91478 143 143 const ULONG cPages = cb >> PAGE_SHIFT; 144 144 PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJOS2, aPages[cPages]), 145 RTR0MEMOBJTYPE_PAGE, NULL, cb );145 RTR0MEMOBJTYPE_PAGE, NULL, cb, NULL); 146 146 if (!pMemOs2) 147 147 return VERR_NO_MEMORY; … … 180 180 const ULONG cPages = cb >> PAGE_SHIFT; 181 181 PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJOS2, aPages[cPages]), 182 RTR0MEMOBJTYPE_LOW, NULL, cb );182 RTR0MEMOBJTYPE_LOW, NULL, cb, NULL); 183 183 if (!pMemOs2) 184 184 return VERR_NO_MEMORY; … … 209 209 210 210 /* create the object. */ 211 PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF(RTR0MEMOBJOS2, Lock), RTR0MEMOBJTYPE_CONT, NULL, cb );211 PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF(RTR0MEMOBJOS2, Lock), RTR0MEMOBJTYPE_CONT, NULL, cb, NULL); 212 212 if (!pMemOs2) 213 213 return VERR_NO_MEMORY; … … 237 237 238 238 /* create the object. */ 239 PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF(RTR0MEMOBJOS2, Lock), RTR0MEMOBJTYPE_PHYS, NULL, cb );239 PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF(RTR0MEMOBJOS2, Lock), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL); 240 240 if (!pMemOs2) 241 241 return VERR_NO_MEMORY; … … 269 269 270 270 /* create the object. */ 271 PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF(RTR0MEMOBJOS2, Lock), RTR0MEMOBJTYPE_PHYS, NULL, cb );271 PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF(RTR0MEMOBJOS2, Lock), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL); 272 272 if (!pMemOs2) 273 273 return VERR_NO_MEMORY; … … 290 290 const ULONG cPages = cb >> PAGE_SHIFT; 291 291 PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJOS2, aPages[cPages]), 292 RTR0MEMOBJTYPE_LOCK, (void *)R3Ptr, cb );292 RTR0MEMOBJTYPE_LOCK, (void *)R3Ptr, cb, NULL); 293 293 if (!pMemOs2) 294 294 return VERR_NO_MEMORY; … … 317 317 const ULONG cPages = cb >> PAGE_SHIFT; 318 318 PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJOS2, aPages[cPages]), 319 RTR0MEMOBJTYPE_LOCK, pv, cb );319 RTR0MEMOBJTYPE_LOCK, pv, cb, NULL); 320 320 if (!pMemOs2) 321 321 return VERR_NO_MEMORY; … … 423 423 cbSub = pMemToMapOs2->Core.cb - offSub; 424 424 PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF(RTR0MEMOBJOS2, Lock), RTR0MEMOBJTYPE_MAPPING, 425 (uint8_t *)pvR0 + offSub, cbSub );425 (uint8_t *)pvR0 + offSub, cbSub, NULL); 426 426 if (pMemOs2) 427 427 { … … 513 513 */ 514 514 PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF(RTR0MEMOBJOS2, Lock), RTR0MEMOBJTYPE_MAPPING, 515 pvR3, pMemToMapOs2->Core.cb );515 pvR3, pMemToMapOs2->Core.cb, NULL); 516 516 if (pMemOs2) 517 517 { -
trunk/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.c
r91446 r91478 653 653 { 654 654 /* Create the object. */ 655 PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_PAGE, NULL, cb );655 PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_PAGE, NULL, cb, NULL); 656 656 if (RT_UNLIKELY(!pMemSolaris)) 657 657 return VERR_NO_MEMORY; … … 683 683 684 684 /* Create the object */ 685 PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_LOW, NULL, cb );685 PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_LOW, NULL, cb, NULL); 686 686 if (!pMemSolaris) 687 687 return VERR_NO_MEMORY; … … 712 712 { 713 713 #if HC_ARCH_BITS == 64 714 PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_PHYS_NC, NULL, cb );714 PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_PHYS_NC, NULL, cb, NULL); 715 715 if (RT_UNLIKELY(!pMemSolaris)) 716 716 return VERR_NO_MEMORY; … … 769 769 AssertMsgReturn(PhysHighest >= 16 *_1M, ("PhysHigest=%RHp\n", PhysHighest), VERR_NOT_SUPPORTED); 770 770 771 PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_PHYS, NULL, cb );771 PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL); 772 772 if (RT_UNLIKELY(!pMemSolaris)) 773 773 return VERR_NO_MEMORY; … … 841 841 842 842 /* Create the object. */ 843 PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_PHYS, NULL, cb );843 PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL); 844 844 if (!pMemSolaris) 845 845 return VERR_NO_MEMORY; … … 861 861 862 862 /* Create the locking object */ 863 PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_LOCK, (void *)R3Ptr, cb );863 PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_LOCK, (void *)R3Ptr, cb, NULL); 864 864 if (!pMemSolaris) 865 865 return VERR_NO_MEMORY; … … 892 892 NOREF(fAccess); 893 893 894 PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_LOCK, pv, cb );894 PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_LOCK, pv, cb, NULL); 895 895 if (!pMemSolaris) 896 896 return VERR_NO_MEMORY; … … 932 932 933 933 /* Create the object. */ 934 pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_RES_VIRT, pv, cb );934 pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_RES_VIRT, pv, cb, NULL); 935 935 if (!pMemSolaris) 936 936 { … … 1002 1002 * Create a memory object for the mapping. 1003 1003 */ 1004 PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_MAPPING, pv, cbSub );1004 PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_MAPPING, pv, cbSub, NULL); 1005 1005 if (pMemSolaris) 1006 1006 { … … 1046 1046 */ 1047 1047 PRTR0MEMOBJSOL pMemSolaris; 1048 pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_MAPPING, pb, cb );1048 pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_MAPPING, pb, cb, NULL); 1049 1049 if (RT_UNLIKELY(!pMemSolaris)) 1050 1050 return VERR_NO_MEMORY;
Note:
See TracChangeset
for help on using the changeset viewer.