Changeset 5606 in vbox
- Timestamp:
- Nov 1, 2007 7:43:40 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 25897
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/cdefs.h
r5605 r5606 1030 1030 */ 1031 1031 #ifndef RT_NO_DEPRECATED_MACROS 1032 /** @copydoc RT_ALIGN_P1033 * @deprecated use RT_ALIGN_P. */1034 # define ALIGNP(pv, uAlignment) RT_ALIGN_P(pv, uAlignment)1035 /** @copydoc RT_SIZEOFMEMB1036 * @deprecated Use RT_SIZEOFMEMB. */1037 # define SIZEOFMEMB(type, member) RT_SIZEOFMEMB(type, member)1038 1032 /** @copydoc RT_ELEMENTS 1039 1033 * @deprecated use RT_ELEMENTS. */ -
trunk/src/VBox/Additions/WINNT/VBoxGuest/VBoxGuest.cpp
r5557 r5606 1467 1467 dprintf(("VBoxGuest::reserveHypervisorMemory: MmMapIoSpace returned %p\n", pDevExt->hypervisorMapping)); 1468 1468 dprintf(("VBoxGuest::reserveHypervisorMemory: communicating %p to host\n", 1469 ALIGNP(pDevExt->hypervisorMapping, 0x400000)));1469 RT_ALIGN_P(pDevExt->hypervisorMapping, 0x400000))); 1470 1470 1471 1471 /* align at 4MB */ 1472 req->hypervisorStart = (RTGCPTR) ALIGNP(pDevExt->hypervisorMapping, 0x400000);1472 req->hypervisorStart = (RTGCPTR)RT_ALIGN_P(pDevExt->hypervisorMapping, 0x400000); 1473 1473 1474 1474 req->header.requestType = VMMDevReq_SetHypervisorInfo; -
trunk/src/VBox/Additions/linux/module/vboxmod.c
r5042 r5606 525 525 { 526 526 /* communicate result to VMM, align at 4MB */ 527 req->hypervisorStart = (vmmDevHypPtr) ALIGNP(hypervisorArea, 0x400000);527 req->hypervisorStart = (vmmDevHypPtr)RT_ALIGN_P(hypervisorArea, 0x400000); 528 528 req->header.requestType = VMMDevReq_SetHypervisorInfo; 529 529 req->header.rc = VERR_GENERAL_FAILURE; -
trunk/src/VBox/HostDrivers/Support/SUPDRVShared.c
r5605 r5606 2981 2981 */ 2982 2982 pImage = (PSUPDRVLDRIMAGE)pv; 2983 pImage->pvImage = ALIGNP(pImage + 1, 32);2983 pImage->pvImage = RT_ALIGN_P(pImage + 1, 32); 2984 2984 pImage->cbImage = pReq->u.In.cbImage; 2985 2985 pImage->pfnModuleInit = NULL; -
trunk/src/VBox/HostDrivers/Support/testcase/tstPin.cpp
r4825 r5606 73 73 aPinnings[i].pv = NULL; 74 74 SUPPageAlloc(0x10000 >> PAGE_SHIFT, &aPinnings[i].pv); 75 aPinnings[i].pvAligned = ALIGNP(aPinnings[i].pv, PAGE_SIZE);75 aPinnings[i].pvAligned = RT_ALIGN_P(aPinnings[i].pv, PAGE_SIZE); 76 76 rc = SUPPageLock(aPinnings[i].pvAligned, 0xf000 >> PAGE_SHIFT, &aPinnings[i].aPages[0]); 77 77 if (!rc) -
trunk/src/VBox/Runtime/testcase/tstHeapSimple.cpp
r4071 r5606 102 102 } 103 103 memset(aOps[i].pvAlloc, szFill[i], aOps[i].cb); 104 if ( ALIGNP(aOps[i].pvAlloc, (aOps[i].uAlignment ? aOps[i].uAlignment : 8)) != aOps[i].pvAlloc)104 if (RT_ALIGN_P(aOps[i].pvAlloc, (aOps[i].uAlignment ? aOps[i].uAlignment : 8)) != aOps[i].pvAlloc) 105 105 { 106 106 RTPrintf("Failure: RTHeapSimpleAlloc(%p, %#x, %#x,) -> %p\n", (void *)Heap, aOps[i].cb, aOps[i].uAlignment, i); -
trunk/src/VBox/VMM/MMPhys.cpp
r4388 r5606 83 83 AssertMsg(pVM, ("Invalid VM pointer\n")); 84 84 if (pvRam) 85 AssertReturn( ALIGNP(pvRam, PAGE_SIZE) == pvRam, VERR_INVALID_PARAMETER);85 AssertReturn(RT_ALIGN_P(pvRam, PAGE_SIZE) == pvRam, VERR_INVALID_PARAMETER); 86 86 else 87 87 AssertReturn(fFlags & MM_RAM_FLAGS_DYNAMIC_ALLOC, VERR_INVALID_PARAMETER); -
trunk/src/VBox/VMM/VMMAll/MMAllHyper.cpp
r4071 r5606 568 568 pFree->cb -= cb; 569 569 pvRet = (char *)(&pFree->core + 1) + pFree->cb; 570 AssertMsg( ALIGNP(pvRet, PAGE_SIZE) == pvRet, ("pvRet=%p cb=%#x pFree=%p pFree->cb=%#x\n", pvRet, cb, pFree, pFree->cb));570 AssertMsg(RT_ALIGN_P(pvRet, PAGE_SIZE) == pvRet, ("pvRet=%p cb=%#x pFree=%p pFree->cb=%#x\n", pvRet, cb, pFree, pFree->cb)); 571 571 Log3(("mmHyperAllocPages: cbFree %d -> %d (%d)\n", pHeap->cbFree, pHeap->cbFree - cb, -(int)cb)); 572 572 pHeap->cbFree -= cb; … … 712 712 if (!pv) 713 713 return VINF_SUCCESS; 714 AssertMsgReturn( ALIGNP(pv, MMHYPER_HEAP_ALIGN_MIN) == pv,714 AssertMsgReturn(RT_ALIGN_P(pv, MMHYPER_HEAP_ALIGN_MIN) == pv, 715 715 ("Invalid pointer %p!\n", pv), 716 716 VERR_INVALID_POINTER); … … 740 740 #ifdef VBOX_WITH_STATISTICS 741 741 PMMHYPERSTAT pStat = (PMMHYPERSTAT)((uintptr_t)pChunk + pChunk->offStat); 742 AssertMsgReturn( ALIGNP(pStat, MMHYPER_HEAP_ALIGN_MIN) == (void *)pStat742 AssertMsgReturn( RT_ALIGN_P(pStat, MMHYPER_HEAP_ALIGN_MIN) == (void *)pStat 743 743 && pChunk->offStat, 744 744 ("%p: offStat=%#RX32!\n", pv, pChunk->offStat), -
trunk/src/VBox/VMM/testcase/tstMMHyperHeap.cpp
r4071 r5606 117 117 } 118 118 memset(aOps[i].pvAlloc, szFill[i], aOps[i].cb); 119 if ( ALIGNP(aOps[i].pvAlloc, (aOps[i].uAlignment ? aOps[i].uAlignment : 8)) != aOps[i].pvAlloc)119 if (RT_ALIGN_P(aOps[i].pvAlloc, (aOps[i].uAlignment ? aOps[i].uAlignment : 8)) != aOps[i].pvAlloc) 120 120 { 121 121 RTPrintf("Failure: MMHyperAlloc(, %#x, %#x,) -> %p, invalid alignment!\n", aOps[i].cb, aOps[i].uAlignment, aOps[i].pvAlloc);
Note:
See TracChangeset
for help on using the changeset viewer.