VirtualBox

Changeset 5606 in vbox


Ignore:
Timestamp:
Nov 1, 2007 7:43:40 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
25897
Message:

ALIGNP SIZEOFMEMB

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/cdefs.h

    r5605 r5606  
    10301030 */
    10311031#ifndef RT_NO_DEPRECATED_MACROS
    1032 /** @copydoc RT_ALIGN_P
    1033  * @deprecated use RT_ALIGN_P. */
    1034 # define ALIGNP(pv, uAlignment)         RT_ALIGN_P(pv, uAlignment)
    1035 /** @copydoc RT_SIZEOFMEMB
    1036  * @deprecated Use RT_SIZEOFMEMB. */
    1037 # define SIZEOFMEMB(type, member)       RT_SIZEOFMEMB(type, member)
    10381032/** @copydoc RT_ELEMENTS
    10391033 * @deprecated use RT_ELEMENTS. */
  • trunk/src/VBox/Additions/WINNT/VBoxGuest/VBoxGuest.cpp

    r5557 r5606  
    14671467            dprintf(("VBoxGuest::reserveHypervisorMemory: MmMapIoSpace returned %p\n", pDevExt->hypervisorMapping));
    14681468            dprintf(("VBoxGuest::reserveHypervisorMemory: communicating %p to host\n",
    1469                     ALIGNP(pDevExt->hypervisorMapping, 0x400000)));
     1469                    RT_ALIGN_P(pDevExt->hypervisorMapping, 0x400000)));
    14701470
    14711471            /* align at 4MB */
    1472             req->hypervisorStart = (RTGCPTR)ALIGNP(pDevExt->hypervisorMapping, 0x400000);
     1472            req->hypervisorStart = (RTGCPTR)RT_ALIGN_P(pDevExt->hypervisorMapping, 0x400000);
    14731473
    14741474            req->header.requestType = VMMDevReq_SetHypervisorInfo;
  • trunk/src/VBox/Additions/linux/module/vboxmod.c

    r5042 r5606  
    525525            {
    526526                /* communicate result to VMM, align at 4MB */
    527                 req->hypervisorStart    = (vmmDevHypPtr)ALIGNP(hypervisorArea, 0x400000);
     527                req->hypervisorStart    = (vmmDevHypPtr)RT_ALIGN_P(hypervisorArea, 0x400000);
    528528                req->header.requestType = VMMDevReq_SetHypervisorInfo;
    529529                req->header.rc          = VERR_GENERAL_FAILURE;
  • trunk/src/VBox/HostDrivers/Support/SUPDRVShared.c

    r5605 r5606  
    29812981     */
    29822982    pImage = (PSUPDRVLDRIMAGE)pv;
    2983     pImage->pvImage         = ALIGNP(pImage + 1, 32);
     2983    pImage->pvImage         = RT_ALIGN_P(pImage + 1, 32);
    29842984    pImage->cbImage         = pReq->u.In.cbImage;
    29852985    pImage->pfnModuleInit   = NULL;
  • trunk/src/VBox/HostDrivers/Support/testcase/tstPin.cpp

    r4825 r5606  
    7373            aPinnings[i].pv = NULL;
    7474            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);
    7676            rc = SUPPageLock(aPinnings[i].pvAligned, 0xf000 >> PAGE_SHIFT, &aPinnings[i].aPages[0]);
    7777            if (!rc)
  • trunk/src/VBox/Runtime/testcase/tstHeapSimple.cpp

    r4071 r5606  
    102102        }
    103103        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)
    105105        {
    106106            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  
    8383    AssertMsg(pVM, ("Invalid VM pointer\n"));
    8484    if (pvRam)
    85         AssertReturn(ALIGNP(pvRam, PAGE_SIZE) == pvRam, VERR_INVALID_PARAMETER);
     85        AssertReturn(RT_ALIGN_P(pvRam, PAGE_SIZE) == pvRam, VERR_INVALID_PARAMETER);
    8686    else
    8787        AssertReturn(fFlags & MM_RAM_FLAGS_DYNAMIC_ALLOC, VERR_INVALID_PARAMETER);
  • trunk/src/VBox/VMM/VMMAll/MMAllHyper.cpp

    r4071 r5606  
    568568        pFree->cb -= cb;
    569569        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));
    571571        Log3(("mmHyperAllocPages: cbFree %d -> %d (%d)\n", pHeap->cbFree, pHeap->cbFree - cb, -(int)cb));
    572572        pHeap->cbFree -= cb;
     
    712712    if (!pv)
    713713        return VINF_SUCCESS;
    714     AssertMsgReturn(ALIGNP(pv, MMHYPER_HEAP_ALIGN_MIN) == pv,
     714    AssertMsgReturn(RT_ALIGN_P(pv, MMHYPER_HEAP_ALIGN_MIN) == pv,
    715715                    ("Invalid pointer %p!\n", pv),
    716716                    VERR_INVALID_POINTER);
     
    740740#ifdef VBOX_WITH_STATISTICS
    741741    PMMHYPERSTAT    pStat = (PMMHYPERSTAT)((uintptr_t)pChunk + pChunk->offStat);
    742     AssertMsgReturn(    ALIGNP(pStat, MMHYPER_HEAP_ALIGN_MIN) == (void *)pStat
     742    AssertMsgReturn(    RT_ALIGN_P(pStat, MMHYPER_HEAP_ALIGN_MIN) == (void *)pStat
    743743                    &&  pChunk->offStat,
    744744                    ("%p: offStat=%#RX32!\n", pv, pChunk->offStat),
  • trunk/src/VBox/VMM/testcase/tstMMHyperHeap.cpp

    r4071 r5606  
    117117        }
    118118        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)
    120120        {
    121121            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.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette