Author: gschneider
Date: Thu Jun 10 19:33:04 2010
New Revision: 47742
URL:
http://svn.reactos.org/svn/reactos?rev=47742&view=rev
Log:
[WIN32K]
- Tag even more pool allocations
- Remove dead code, adjust comments
Modified:
trunk/reactos/subsystems/win32/win32k/main/dllmain.c
trunk/reactos/subsystems/win32/win32k/ntuser/class.c
trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c
trunk/reactos/subsystems/win32/win32k/ntuser/object.c
trunk/reactos/subsystems/win32/win32k/ntuser/timer.c
trunk/reactos/subsystems/win32/win32k/objects/freetype.c
Modified: trunk/reactos/subsystems/win32/win32k/main/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ma…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/main/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/main/dllmain.c [iso-8859-1] Thu Jun 10 19:33:04
2010
@@ -337,7 +337,7 @@
if (Process->Win32Process == NULL)
{
/* FIXME - lock the process */
- Process->Win32Process = ExAllocatePool(NonPagedPool, sizeof(PROCESSINFO));
+ Process->Win32Process = ExAllocatePoolWithTag(NonPagedPool, sizeof(PROCESSINFO),
USERTAG_PROCESSINFO);
if (Process->Win32Process == NULL)
return STATUS_NO_MEMORY;
@@ -350,7 +350,7 @@
if (Thread->Tcb.Win32Thread == NULL)
{
- Thread->Tcb.Win32Thread = ExAllocatePool (NonPagedPool, sizeof(THREADINFO));
+ Thread->Tcb.Win32Thread = ExAllocatePoolWithTag(NonPagedPool,
sizeof(THREADINFO), USERTAG_THREADINFO);
if (Thread->Tcb.Win32Thread == NULL)
return STATUS_NO_MEMORY;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/class.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/class.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/class.c [iso-8859-1] Thu Jun 10 19:33:04
2010
@@ -1442,8 +1442,9 @@
}
/* allocate a temporary buffer that can hold the unicode class name */
- szTemp = ExAllocatePool(PagedPool,
- BufLen);
+ szTemp = ExAllocatePoolWithTag(PagedPool,
+ BufLen,
+ USERTAG_CLASS);
if (szTemp == NULL)
{
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c [iso-8859-1] Thu Jun 10
19:33:04 2010
@@ -742,7 +742,7 @@
OutPwszBuff = ExAllocatePoolWithTag(NonPagedPool,sizeof(WCHAR) * cchBuff,
TAG_STRING);
if( !OutPwszBuff )
{
- DPRINT1( "ExAllocatePool(%d) failed\n", sizeof(WCHAR) * cchBuff);
+ DPRINT1( "ExAllocatePoolWithTag(%d) failed\n", sizeof(WCHAR) *
cchBuff);
RETURN(0);
}
RtlZeroMemory( OutPwszBuff, sizeof( WCHAR ) * cchBuff );
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/object.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/object.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/object.c [iso-8859-1] Thu Jun 10 19:33:04
2010
@@ -283,7 +283,6 @@
PVOID mem;
//FIXME: dont alloc all at once! must be mapped into umode also...
- //mem = ExAllocatePool(PagedPool, sizeof(USER_HANDLE_ENTRY) * 1024*2);
mem = UserHeapAlloc(sizeof(USER_HANDLE_ENTRY) * 1024*2);
if (!mem)
{
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/timer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/timer.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/timer.c [iso-8859-1] Thu Jun 10 19:33:04
2010
@@ -691,7 +691,7 @@
WindowLessTimersBitMapBuffer,
BitmapBytes * 8);
- /* yes we need this, since ExAllocatePool isn't supposed to zero out allocated
memory */
+ /* yes we need this, since ExAllocatePoolWithTag isn't supposed to zero out
allocated memory */
RtlClearAllBits(&WindowLessTimersBitMap);
return STATUS_SUCCESS;
Modified: trunk/reactos/subsystems/win32/win32k/objects/freetype.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] Thu Jun 10
19:33:04 2010
@@ -219,17 +219,17 @@
if (NT_SUCCESS(Status))
{
- DirInfoBuffer = ExAllocatePool(PagedPool, 0x4000);
+ DirInfoBuffer = ExAllocatePoolWithTag(PagedPool, 0x4000, TAG_FONT);
if (DirInfoBuffer == NULL)
{
ZwClose(hDirectory);
return;
}
- FileName.Buffer = ExAllocatePool(PagedPool, MAX_PATH * sizeof(WCHAR));
+ FileName.Buffer = ExAllocatePoolWithTag(PagedPool, MAX_PATH * sizeof(WCHAR),
TAG_FONT);
if (FileName.Buffer == NULL)
{
- ExFreePool(DirInfoBuffer);
+ ExFreePoolWithTag(DirInfoBuffer, TAG_FONT);
ZwClose(hDirectory);
return;
}
@@ -273,8 +273,8 @@
bRestartScan = FALSE;
}
- ExFreePool(FileName.Buffer);
- ExFreePool(DirInfoBuffer);
+ ExFreePoolWithTag(FileName.Buffer, TAG_FONT);
+ ExFreePoolWithTag(DirInfoBuffer, TAG_FONT);
ZwClose(hDirectory);
}
}