Author: gschneider
Date: Thu Jun 10 19:58:39 2010
New Revision: 47743
URL:
http://svn.reactos.org/svn/reactos?rev=47743&view=rev
Log:
[WIN32K] Tag the remaining untagged pool allocations
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c
trunk/reactos/subsystems/win32/win32k/ntuser/display.c
trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c
trunk/reactos/subsystems/win32/win32k/objects/device.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] Thu Jun 10
19:58:39 2010
@@ -688,7 +688,7 @@
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;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/display.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/display.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/display.c [iso-8859-1] Thu Jun 10
19:58:39 2010
@@ -53,7 +53,7 @@
return STATUS_BUFFER_TOO_SMALL;
}
- pSafeDevMode = ExAllocatePool(PagedPool, Size + ExtraSize);
+ pSafeDevMode = ExAllocatePoolWithTag(PagedPool, Size + ExtraSize, GDITAG_DEVMODE);
if (pSafeDevMode == NULL)
{
return STATUS_NO_MEMORY;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c [iso-8859-1] Thu Jun 10
19:58:39 2010
@@ -551,7 +551,7 @@
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 @@
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 @@
ExFreePool(safeHMonitorList);
if (!NT_SUCCESS(status))
{
- ExFreePool(safeRectList);
+ ExFreePoolWithTag(safeRectList, USERTAG_MONITORRECTS);
SetLastNtError(status);
return -1;
}
@@ -597,7 +597,7 @@
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 @@
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 @@
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 @@
numMonitors, 0);
if (numMonitors <= 0)
{
- ExFreePool(hMonitorList);
- ExFreePool(rectList);
+ ExFreePoolWithTag(hMonitorList, USERTAG_MONITORRECTS);
+ ExFreePoolWithTag(rectList, USERTAG_MONITORRECTS);
return (HMONITOR)NULL;
}
@@ -874,8 +874,8 @@
}
}
- ExFreePool(hMonitorList);
- ExFreePool(rectList);
+ ExFreePoolWithTag(hMonitorList, USERTAG_MONITORRECTS);
+ ExFreePoolWithTag(rectList, USERTAG_MONITORRECTS);
return hMonitor;
}
Modified: trunk/reactos/subsystems/win32/win32k/objects/device.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/device.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/device.c [iso-8859-1] Thu Jun 10
19:58:39 2010
@@ -127,7 +127,7 @@
// 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 @@
PVOID NewBuffer;
SizeOfCachedDevModes += SizeNeeded;
- NewBuffer = ExAllocatePool(PagedPool, SizeOfCachedDevModes);
+ NewBuffer = ExAllocatePoolWithTag(PagedPool, SizeOfCachedDevModes,
GDITAG_DEVMODE);
if (NewBuffer == NULL)
{
/* clean up */