- Tag even more pool allocations
- Remove dead code, adjust comments

svn path=/trunk/; revision=47742
This commit is contained in:
Gregor Schneider 2010-06-10 19:33:04 +00:00
parent fdec1db734
commit 31de1284d4
6 changed files with 12 additions and 12 deletions

View file

@ -337,7 +337,7 @@ Win32kInitWin32Thread(PETHREAD Thread)
if (Process->Win32Process == NULL) if (Process->Win32Process == NULL)
{ {
/* FIXME - lock the process */ /* FIXME - lock the process */
Process->Win32Process = ExAllocatePool(NonPagedPool, sizeof(PROCESSINFO)); Process->Win32Process = ExAllocatePoolWithTag(NonPagedPool, sizeof(PROCESSINFO), USERTAG_PROCESSINFO);
if (Process->Win32Process == NULL) if (Process->Win32Process == NULL)
return STATUS_NO_MEMORY; return STATUS_NO_MEMORY;
@ -350,7 +350,7 @@ Win32kInitWin32Thread(PETHREAD Thread)
if (Thread->Tcb.Win32Thread == NULL) 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) if (Thread->Tcb.Win32Thread == NULL)
return STATUS_NO_MEMORY; return STATUS_NO_MEMORY;

View file

@ -1442,8 +1442,9 @@ UserGetClassName(IN PCLS Class,
} }
/* allocate a temporary buffer that can hold the unicode class name */ /* allocate a temporary buffer that can hold the unicode class name */
szTemp = ExAllocatePool(PagedPool, szTemp = ExAllocatePoolWithTag(PagedPool,
BufLen); BufLen,
USERTAG_CLASS);
if (szTemp == NULL) if (szTemp == NULL)
{ {
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);

View file

@ -742,7 +742,7 @@ NtUserToUnicodeEx(
OutPwszBuff = ExAllocatePoolWithTag(NonPagedPool,sizeof(WCHAR) * cchBuff, TAG_STRING); OutPwszBuff = ExAllocatePoolWithTag(NonPagedPool,sizeof(WCHAR) * cchBuff, TAG_STRING);
if( !OutPwszBuff ) if( !OutPwszBuff )
{ {
DPRINT1( "ExAllocatePool(%d) failed\n", sizeof(WCHAR) * cchBuff); DPRINT1( "ExAllocatePoolWithTag(%d) failed\n", sizeof(WCHAR) * cchBuff);
RETURN(0); RETURN(0);
} }
RtlZeroMemory( OutPwszBuff, sizeof( WCHAR ) * cchBuff ); RtlZeroMemory( OutPwszBuff, sizeof( WCHAR ) * cchBuff );

View file

@ -283,7 +283,6 @@ BOOL FASTCALL UserCreateHandleTable(VOID)
PVOID mem; PVOID mem;
//FIXME: dont alloc all at once! must be mapped into umode also... //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); mem = UserHeapAlloc(sizeof(USER_HANDLE_ENTRY) * 1024*2);
if (!mem) if (!mem)
{ {

View file

@ -691,7 +691,7 @@ InitTimerImpl(VOID)
WindowLessTimersBitMapBuffer, WindowLessTimersBitMapBuffer,
BitmapBytes * 8); 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); RtlClearAllBits(&WindowLessTimersBitMap);
return STATUS_SUCCESS; return STATUS_SUCCESS;

View file

@ -219,17 +219,17 @@ IntLoadSystemFonts(VOID)
if (NT_SUCCESS(Status)) if (NT_SUCCESS(Status))
{ {
DirInfoBuffer = ExAllocatePool(PagedPool, 0x4000); DirInfoBuffer = ExAllocatePoolWithTag(PagedPool, 0x4000, TAG_FONT);
if (DirInfoBuffer == NULL) if (DirInfoBuffer == NULL)
{ {
ZwClose(hDirectory); ZwClose(hDirectory);
return; return;
} }
FileName.Buffer = ExAllocatePool(PagedPool, MAX_PATH * sizeof(WCHAR)); FileName.Buffer = ExAllocatePoolWithTag(PagedPool, MAX_PATH * sizeof(WCHAR), TAG_FONT);
if (FileName.Buffer == NULL) if (FileName.Buffer == NULL)
{ {
ExFreePool(DirInfoBuffer); ExFreePoolWithTag(DirInfoBuffer, TAG_FONT);
ZwClose(hDirectory); ZwClose(hDirectory);
return; return;
} }
@ -273,8 +273,8 @@ IntLoadSystemFonts(VOID)
bRestartScan = FALSE; bRestartScan = FALSE;
} }
ExFreePool(FileName.Buffer); ExFreePoolWithTag(FileName.Buffer, TAG_FONT);
ExFreePool(DirInfoBuffer); ExFreePoolWithTag(DirInfoBuffer, TAG_FONT);
ZwClose(hDirectory); ZwClose(hDirectory);
} }
} }