VirtualBox

Changeset 70157 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 15, 2017 4:18:28 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
119719
Message:

iprt/r0drv/nt: Fixing NT4, broke it just now.

Location:
trunk/src/VBox/Runtime/r0drv/nt
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/nt/alloc-r0drv-nt.cpp

    r70153 r70157  
    7777{
    7878    pHdr->u32Magic += 1;
    79     ExFreePool(pHdr);
     79    if (g_pfnrtExFreePoolWithTag)
     80        g_pfnrtExFreePoolWithTag(pHdr, IPRT_NT_POOL_TAG);
     81    else
     82        ExFreePool(pHdr);
    8083}
    8184
  • trunk/src/VBox/Runtime/r0drv/nt/initterm-r0drv-nt.cpp

    r70153 r70157  
    4545/** ExAllocatePoolWithTag, introduced in W2K. */
    4646decltype(ExAllocatePoolWithTag)        *g_pfnrtExAllocatePoolWithTag;
     47/** ExFreePoolWithTag, introduced in W2K. */
     48decltype(ExFreePoolWithTag)            *g_pfnrtExFreePoolWithTag;
    4749/** ExSetTimerResolution, introduced in W2K. */
    4850PFNMYEXSETTIMERRESOLUTION               g_pfnrtNtExSetTimerResolution;
     
    274276
    275277    GET_SYSTEM_ROUTINE(ExAllocatePoolWithTag);
     278    GET_SYSTEM_ROUTINE(ExFreePoolWithTag);
    276279    GET_SYSTEM_ROUTINE_PRF(Nt,ExSetTimerResolution);
    277280    GET_SYSTEM_ROUTINE_PRF(Nt,KeFlushQueuedDpcs);
  • trunk/src/VBox/Runtime/r0drv/nt/internal-r0drv-nt.h

    r70153 r70157  
    5959
    6060extern decltype(ExAllocatePoolWithTag)        *g_pfnrtExAllocatePoolWithTag;
     61extern decltype(ExFreePoolWithTag)            *g_pfnrtExFreePoolWithTag;
    6162extern PFNMYEXSETTIMERRESOLUTION               g_pfnrtNtExSetTimerResolution;
    6263extern PFNMYKEFLUSHQUEUEDDPCS                  g_pfnrtNtKeFlushQueuedDpcs;
  • trunk/src/VBox/Runtime/r0drv/nt/memobj-r0drv-nt.cpp

    r70153 r70157  
    111111        case RTR0MEMOBJTYPE_PAGE:
    112112            Assert(pMemNt->Core.pv);
    113             ExFreePool(pMemNt->Core.pv);
     113            if (g_pfnrtExFreePoolWithTag)
     114                g_pfnrtExFreePoolWithTag(pMemNt->Core.pv, IPRT_NT_POOL_TAG);
     115            else
     116                ExFreePool(pMemNt->Core.pv);
    114117            pMemNt->Core.pv = NULL;
    115118
     
    368371        PhysAddrLowest.QuadPart   = 0;
    369372        PhysAddrBoundary.QuadPart = (uAlignment == PAGE_SIZE) ? 0 : uAlignment;
    370         pv = MmAllocateContiguousMemorySpecifyCache(cb, PhysAddrLowest, PhysAddrHighest, PhysAddrBoundary, MmCached);
     373        pv = g_pfnrtMmAllocateContiguousMemorySpecifyCache(cb, PhysAddrLowest, PhysAddrHighest, PhysAddrBoundary, MmCached);
    371374    }
    372375    else if (uAlignment == PAGE_SIZE)
  • trunk/src/VBox/Runtime/r0drv/nt/the-nt-kernel.h

    r70153 r70157  
    7474 */
    7575#undef ExAllocatePool
     76#undef ExFreePool
    7677
    7778/** @def IPRT_NT_POOL_TAG
Note: See TracChangeset for help on using the changeset viewer.

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