diff --git a/reactos/subsystems/win32/win32k/ntuser/desktop.c b/reactos/subsystems/win32/win32k/ntuser/desktop.c index 57a5be135e7..502528380f6 100644 --- a/reactos/subsystems/win32/win32k/ntuser/desktop.c +++ b/reactos/subsystems/win32/win32k/ntuser/desktop.c @@ -688,7 +688,7 @@ UserBuildShellHookHwndList(PDESKTOP Desktop) if (!entries) return NULL; - list = ExAllocatePool(PagedPool, sizeof(HWND) * (entries + 1)); /* alloc one extra for nullterm */ + list = ExAllocatePoolWithTag(PagedPool, sizeof(HWND) * (entries + 1), USERTAG_WINDOWLIST); /* alloc one extra for nullterm */ if (list) { HWND* cursor = list; diff --git a/reactos/subsystems/win32/win32k/ntuser/display.c b/reactos/subsystems/win32/win32k/ntuser/display.c index 561171dedeb..b5986a58df2 100644 --- a/reactos/subsystems/win32/win32k/ntuser/display.c +++ b/reactos/subsystems/win32/win32k/ntuser/display.c @@ -53,7 +53,7 @@ NtUserEnumDisplaySettings( return STATUS_BUFFER_TOO_SMALL; } - pSafeDevMode = ExAllocatePool(PagedPool, Size + ExtraSize); + pSafeDevMode = ExAllocatePoolWithTag(PagedPool, Size + ExtraSize, GDITAG_DEVMODE); if (pSafeDevMode == NULL) { return STATUS_NO_MEMORY; diff --git a/reactos/subsystems/win32/win32k/ntuser/monitor.c b/reactos/subsystems/win32/win32k/ntuser/monitor.c index d13c4383a1f..1d49cae6cba 100644 --- a/reactos/subsystems/win32/win32k/ntuser/monitor.c +++ b/reactos/subsystems/win32/win32k/ntuser/monitor.c @@ -551,7 +551,7 @@ NtUserEnumDisplayMonitors( if (hMonitorList != NULL && listSize != 0) { - safeHMonitorList = ExAllocatePool(PagedPool, sizeof (HMONITOR) * listSize); + safeHMonitorList = ExAllocatePoolWithTag(PagedPool, sizeof (HMONITOR) * listSize, USERTAG_MONITORRECTS); if (safeHMonitorList == NULL) { /* FIXME: SetLastWin32Error? */ @@ -563,7 +563,7 @@ NtUserEnumDisplayMonitors( safeRectList = ExAllocatePoolWithTag(PagedPool, sizeof (RECT) * listSize, USERTAG_MONITORRECTS); if (safeRectList == NULL) { - ExFreePool(safeHMonitorList); + ExFreePoolWithTag(safeHMonitorList, USERTAG_MONITORRECTS); /* FIXME: SetLastWin32Error? */ return -1; } @@ -589,7 +589,7 @@ NtUserEnumDisplayMonitors( ExFreePool(safeHMonitorList); if (!NT_SUCCESS(status)) { - ExFreePool(safeRectList); + ExFreePoolWithTag(safeRectList, USERTAG_MONITORRECTS); SetLastNtError(status); return -1; } @@ -597,7 +597,7 @@ NtUserEnumDisplayMonitors( if (monitorRectList != NULL && listSize != 0) { status = MmCopyToCaller(monitorRectList, safeRectList, sizeof (RECT) * listSize); - ExFreePool(safeRectList); + ExFreePoolWithTag(safeRectList, USERTAG_MONITORRECTS); if (!NT_SUCCESS(status)) { SetLastNtError(status); @@ -839,7 +839,7 @@ NtUserMonitorFromRect( return (HMONITOR)NULL; } - hMonitorList = ExAllocatePool(PagedPool, sizeof (HMONITOR) * numMonitors); + hMonitorList = ExAllocatePoolWithTag(PagedPool, sizeof (HMONITOR) * numMonitors, USERTAG_MONITORRECTS); if (hMonitorList == NULL) { /* FIXME: SetLastWin32Error? */ @@ -848,7 +848,7 @@ NtUserMonitorFromRect( rectList = ExAllocatePoolWithTag(PagedPool, sizeof (RECT) * numMonitors, USERTAG_MONITORRECTS); if (rectList == NULL) { - ExFreePool(hMonitorList); + ExFreePoolWithTag(hMonitorList, USERTAG_MONITORRECTS); /* FIXME: SetLastWin32Error? */ return (HMONITOR)NULL; } @@ -858,8 +858,8 @@ NtUserMonitorFromRect( numMonitors, 0); if (numMonitors <= 0) { - ExFreePool(hMonitorList); - ExFreePool(rectList); + ExFreePoolWithTag(hMonitorList, USERTAG_MONITORRECTS); + ExFreePoolWithTag(rectList, USERTAG_MONITORRECTS); return (HMONITOR)NULL; } @@ -874,8 +874,8 @@ NtUserMonitorFromRect( } } - ExFreePool(hMonitorList); - ExFreePool(rectList); + ExFreePoolWithTag(hMonitorList, USERTAG_MONITORRECTS); + ExFreePoolWithTag(rectList, USERTAG_MONITORRECTS); return hMonitor; } diff --git a/reactos/subsystems/win32/win32k/objects/device.c b/reactos/subsystems/win32/win32k/objects/device.c index 9ebe3a5ec28..ffce4311373 100644 --- a/reactos/subsystems/win32/win32k/objects/device.c +++ b/reactos/subsystems/win32/win32k/objects/device.c @@ -127,7 +127,7 @@ FindDriverFileNames(PUNICODE_STRING DriverFileNames, ULONG DisplayNumber) // DPRINT1("Status: %lx\n", Status); if (Length) { - DriverNames = ExAllocatePool(PagedPool, Length); + DriverNames = ExAllocatePoolWithTag(PagedPool, Length, TAG_DRIVER); // DPRINT1("Length allocated: %d\n", Length); Status = RtlQueryRegistryValues(RTL_REGISTRY_ABSOLUTE, RegistryPath.Buffer, @@ -1686,7 +1686,7 @@ IntEnumDisplaySettings( PVOID NewBuffer; SizeOfCachedDevModes += SizeNeeded; - NewBuffer = ExAllocatePool(PagedPool, SizeOfCachedDevModes); + NewBuffer = ExAllocatePoolWithTag(PagedPool, SizeOfCachedDevModes, GDITAG_DEVMODE); if (NewBuffer == NULL) { /* clean up */