added pool tags for better debugging
authorThomas Bluemel <thomas@reactsoft.com>
Thu, 19 Feb 2004 21:12:11 +0000 (21:12 +0000)
committerThomas Bluemel <thomas@reactsoft.com>
Thu, 19 Feb 2004 21:12:11 +0000 (21:12 +0000)
svn path=/trunk/; revision=8271

33 files changed:
reactos/subsys/win32k/eng/mouse.c
reactos/subsys/win32k/include/tags.h [new file with mode: 0644]
reactos/subsys/win32k/ntuser/accelerator.c
reactos/subsys/win32k/ntuser/caret.c
reactos/subsys/win32k/ntuser/class.c
reactos/subsys/win32k/ntuser/clipboard.c
reactos/subsys/win32k/ntuser/hook.c
reactos/subsys/win32k/ntuser/hotkey.c
reactos/subsys/win32k/ntuser/keyboard.c
reactos/subsys/win32k/ntuser/menu.c
reactos/subsys/win32k/ntuser/message.c
reactos/subsys/win32k/ntuser/misc.c
reactos/subsys/win32k/ntuser/msgqueue.c
reactos/subsys/win32k/ntuser/prop.c
reactos/subsys/win32k/ntuser/scrollbar.c
reactos/subsys/win32k/ntuser/timer.c
reactos/subsys/win32k/ntuser/window.c
reactos/subsys/win32k/ntuser/winpos.c
reactos/subsys/win32k/ntuser/winsta.c
reactos/subsys/win32k/objects/bezier.c
reactos/subsys/win32k/objects/bitmaps.c
reactos/subsys/win32k/objects/brush.c
reactos/subsys/win32k/objects/coord.c
reactos/subsys/win32k/objects/dc.c
reactos/subsys/win32k/objects/dib.c
reactos/subsys/win32k/objects/fillshap.c
reactos/subsys/win32k/objects/gdiobj.c
reactos/subsys/win32k/objects/line.c
reactos/subsys/win32k/objects/palette.c
reactos/subsys/win32k/objects/path.c
reactos/subsys/win32k/objects/print.c
reactos/subsys/win32k/objects/region.c
reactos/subsys/win32k/objects/text.c

index 32a9b12..65e94d1 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: mouse.c,v 1.60 2004/02/08 09:27:39 navaraf Exp $
+/* $Id: mouse.c,v 1.61 2004/02/19 21:12:09 weiden Exp $
  *
  * PROJECT:          ReactOS kernel
  * PURPOSE:          Mouse
@@ -43,6 +43,7 @@
 #include "include/palette.h"
 #include "include/inteng.h"
 #include "include/eng.h"
+#include "include/tags.h"
 #include <include/mouse.h>
 
 #define NDEBUG
@@ -538,8 +539,6 @@ EnableMouse(HDC hDisplayDC)
 
 /* SOFTWARE MOUSE POINTER IMPLEMENTATION **************************************/
 
-#define MOUSE_TAG              TAG('M', 'O', 'U', 'S')
-
 VOID FASTCALL
 IntHideMousePointer(GDIDEVICE *ppdev, SURFOBJ *DestSurface)
 {
@@ -753,7 +752,7 @@ EngSetPointerShape(
 
       Size.cx = ppdev->PointerAttributes.Width;
       Size.cy = ppdev->PointerAttributes.Height;
-      Bits = EngAllocMem(0, psoColor->cjBits, MOUSE_TAG);
+      Bits = EngAllocMem(0, psoColor->cjBits, TAG_MOUSE);
       memcpy(Bits, psoColor->pvBits, psoColor->cjBits);
 
       ppdev->PointerColorSurface = (HSURF)EngCreateBitmap(Size,
@@ -770,7 +769,7 @@ EngSetPointerShape(
 
       Size.cx = ppdev->PointerAttributes.Width;
       Size.cy = ppdev->PointerAttributes.Height << 1;
-      Bits = EngAllocMem(0, psoMask->cjBits, MOUSE_TAG);
+      Bits = EngAllocMem(0, psoMask->cjBits, TAG_MOUSE);
       memcpy(Bits, psoMask->pvBits, psoMask->cjBits);
 
       ppdev->PointerMaskSurface = (HSURF)EngCreateBitmap(Size,
diff --git a/reactos/subsys/win32k/include/tags.h b/reactos/subsys/win32k/include/tags.h
new file mode 100644 (file)
index 0000000..3dcf20d
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef _WIN32K_TAGS_H
+#define _WIN32K_TAGS_H
+
+#define TAG_STRING     TAG('S', 'T', 'R', ' ') /* string */
+
+/* ntuser */
+#define TAG_MOUSE      TAG('M', 'O', 'U', 'S') /* mouse */
+#define TAG_ACCEL      TAG('A', 'C', 'C', 'L') /* accelerator */
+#define TAG_HOOK       TAG('W', 'N', 'H', 'K') /* hook */
+#define TAG_HOTKEY     TAG('H', 'O', 'T', 'K') /* hotkey */
+#define TAG_MENUITEM   TAG('M', 'E', 'N', 'I') /* menu itme */
+#define TAG_MSG                TAG('M', 'E', 'S', 'G') /* message */
+#define TAG_MSGQ       TAG('M', 'S', 'G', 'Q') /* message queue */
+#define TAG_USRMSG     TAG('U', 'M', 'S', 'G') /* user message */
+#define TAG_WNDPROP    TAG('W', 'P', 'R', 'P') /* window property */
+#define TAG_WNAM       TAG('W', 'N', 'A', 'M') /* window name */
+#define TAG_WINLIST    TAG('W', 'N', 'L', 'S') /* window handle list */
+#define TAG_WININTLIST TAG('W', 'N', 'I', 'P') /* window internal pos */
+#define TAG_WINPROCLST TAG('W', 'N', 'P', 'L') /* window proc list */
+#define TAG_SBARINFO   TAG('S', 'B', 'I', 'N') /* scrollbar info */
+#define TAG_TIMER      TAG('T', 'I', 'M', 'R') /* timer entry */
+#define TAG_TIMERTD    TAG('T', 'I', 'M', 'T') /* timer thread dereference list */
+#define TAG_TIMERBMP   TAG('T', 'I', 'M', 'B') /* timers bitmap */
+
+/* objects */
+#define TAG_BEZIER     TAG('B', 'E', 'Z', 'R') /* bezier */
+#define TAG_BITMAP     TAG('B', 'T', 'M', 'P') /* bitmap */
+#define TAG_PATBLT     TAG('P', 'B', 'L', 'T') /* patblt */
+#define TAG_COORD      TAG('C', 'O', 'R', 'D') /* coords */
+#define TAG_DC         TAG('D', 'C', 'D', 'C') /* dc */
+#define TAG_GDIOBJ     TAG('G', 'D', 'I', 'O') /* gdi obj */
+#define TAG_GDIHNDTBLE TAG('G', 'D', 'I', 'H') /* gdi handle table */
+#define TAG_DIB                TAG('D', 'I', 'B', ' ') /* dib */
+#define TAG_COLORMAP   TAG('C', 'O', 'L', 'M') /* color map */
+#define TAG_SHAPE      TAG('S', 'H', 'A', 'P') /* shape */
+#define TAG_PALETTE    TAG('P', 'A', 'L', 'E') /* palette */
+#define TAG_PALETTEMAP TAG('P', 'A', 'L', 'M') /* palette mapping */
+#define TAG_PATH       TAG('P', 'A', 'T', 'H') /* path */
+#define TAG_PRINT      TAG('P', 'R', 'N', 'T') /* print */
+#define TAG_REGION     TAG('P', 'R', 'N', 'T') /* region */
+#define TAG_GDITEXT    TAG('T', 'X', 'T', 'O') /* text */
+#define TAG_FONT       TAG('F', 'N', 'T', 'O') /* font entry */
+
+#endif /* _WIN32K_TAGS_H */
index 7d45f7a..405e21c 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: accelerator.c,v 1.8 2004/02/02 15:16:53 gvg Exp $
+/* $Id: accelerator.c,v 1.9 2004/02/19 21:12:09 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -59,6 +59,7 @@
 #include <include/guicheck.h>
 #include <include/window.h>
 #include <include/focus.h>
+#include <include/tags.h>
 #include <include/accelerator.h>
 
 #define NDEBUG
@@ -175,7 +176,7 @@ NtUserCreateAcceleratorTable(
   AcceleratorTable->Count = EntriesCount;
   if (AcceleratorTable->Count > 0)
   {
-       AcceleratorTable->Table = ExAllocatePool(PagedPool, EntriesCount * sizeof(ACCEL));
+       AcceleratorTable->Table = ExAllocatePoolWithTag(PagedPool, EntriesCount * sizeof(ACCEL), TAG_ACCEL);
        if (AcceleratorTable->Table == NULL)
        {
                ObmCloseHandle(WindowStation->HandleTable, Handle);
index 5993c7c..40b8c46 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: caret.c,v 1.10 2003/12/26 22:52:11 gvg Exp $
+/* $Id: caret.c,v 1.11 2004/02/19 21:12:09 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -17,6 +17,7 @@
 #include <include/caret.h>
 #include <include/timer.h>
 #include <include/callback.h>
+#include <include/tags.h>
 #include <rosrtl/string.h>
 
 #define NDEBUG
@@ -122,7 +123,7 @@ IntQueryCaretBlinkRate(VOID)
   }
   
   ResLength += sizeof(KEY_VALUE_PARTIAL_INFORMATION);
-  KeyValuePartialInfo = ExAllocatePool(PagedPool, ResLength);
+  KeyValuePartialInfo = ExAllocatePoolWithTag(PagedPool, ResLength, TAG_STRING);
   Length = ResLength;
   
   if(!KeyValuePartialInfo)
index df04b92..45d37f7 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: class.c,v 1.46 2004/02/11 17:56:29 navaraf Exp $
+/* $Id: class.c,v 1.47 2004/02/19 21:12:09 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -38,6 +38,7 @@
 #include <include/guicheck.h>
 #include <include/window.h>
 #include <include/color.h>
+#include <include/tags.h>
 
 #define NDEBUG
 #include <debug.h>
@@ -215,7 +216,7 @@ IntGetClassName(struct _WINDOW_OBJECT *WindowObject, LPWSTR lpClassName,
    Length = 0;
    Status = RtlQueryAtomInAtomTable(WinStaObject->AtomTable,
       WindowObject->Class->Atom, NULL, NULL, Name, &Length);
-   Name = ExAllocatePool(NonPagedPool, Length + sizeof(UNICODE_NULL));
+   Name = ExAllocatePoolWithTag(NonPagedPool, Length + sizeof(UNICODE_NULL), TAG_STRING);
    Status = RtlQueryAtomInAtomTable(WinStaObject->AtomTable,
       WindowObject->Class->Atom, NULL, NULL, Name, &Length);
    if (!NT_SUCCESS(Status))
@@ -335,7 +336,7 @@ IntCreateClass(CONST WNDCLASSEXW *lpwcx,
        }
        else
        {               
-               ClassObject->lpszMenuName = ExAllocatePool(NonPagedPool,sizeof(UNICODE_STRING));
+               ClassObject->lpszMenuName = ExAllocatePoolWithTag(NonPagedPool,sizeof(UNICODE_STRING), TAG_STRING);
                RtlCreateUnicodeString(ClassObject->lpszMenuName,(LPWSTR)lpwcx->lpszMenuName);
        }
        /* Extra class data */
@@ -548,7 +549,7 @@ IntSetClassLong(PWINDOW_OBJECT WindowObject, ULONG Offset, LONG dwNewLong, BOOL
     case GCL_MENUNAME:
          if (!IS_INTRESOURCE(dwNewLong))
          {
-           str = ExAllocatePool(PagedPool,sizeof(UNICODE_STRING)+((PUNICODE_STRING)dwNewLong)->Length);
+           str = ExAllocatePoolWithTag(PagedPool,sizeof(UNICODE_STRING)+((PUNICODE_STRING)dwNewLong)->Length, TAG_STRING);
            memcpy(str,(PUNICODE_STRING)dwNewLong,sizeof(UNICODE_STRING)+((PUNICODE_STRING)dwNewLong)->Length);
         WindowObject->Class->lpszMenuName = str;
          }
index 850aeb1..f89c580 100644 (file)
@@ -31,6 +31,8 @@
 #include <include/cleanup.h>
 #include <include/error.h>
 #include <include/useratom.h>
+#include <include/tags.h>
+
 #define NDEBUG
 #include <debug.h>
 
@@ -152,7 +154,7 @@ NtUserGetClipboardFormatName(UINT format, PUNICODE_STRING FormatName,
   }
   
   /* Allocate memory for the string */
-  Buf = ExAllocatePool(NonPagedPool, cchMaxCount * sizeof(WCHAR));
+  Buf = ExAllocatePoolWithTag(NonPagedPool, cchMaxCount * sizeof(WCHAR), TAG_STRING);
   if(!Buf)
   {
     SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
index 2d69557..05bd006 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: hook.c,v 1.4 2003/12/14 22:34:47 gvg Exp $
+/* $Id: hook.c,v 1.5 2004/02/19 21:12:09 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
 #include <include/object.h>
 #include <include/msgqueue.h>
 #include <include/winsta.h>
+#include <include/tags.h>
 #include <internal/ps.h>
 #include <internal/safe.h>
 
 #define NDEBUG
 #include <win32k/debug1.h>
 
-#define TAG_HOOK TAG('W', 'N', 'H', 'K')
-
 #define HOOKID_TO_INDEX(HookId) (HookId - WH_MINHOOK)
 
 STATIC PHOOKTABLE GlobalHooks;
index 48c22de..9f93a82 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: hotkey.c,v 1.6 2004/01/26 23:29:23 gvg Exp $
+/* $Id: hotkey.c,v 1.7 2004/02/19 21:12:09 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -36,6 +36,7 @@
 #include <include/error.h>
 #include <include/msgqueue.h>
 #include <include/hotkey.h>
+#include <include/tags.h>
 
 #define NDEBUG
 #include <debug.h>
@@ -243,8 +244,7 @@ NtUserRegisterHotKey(HWND hWnd,
     return FALSE;
   }
 
-  HotKeyItem = ExAllocatePool (PagedPool,
-                              sizeof(HOT_KEY_ITEM));
+  HotKeyItem = ExAllocatePoolWithTag (PagedPool, sizeof(HOT_KEY_ITEM), TAG_HOTKEY);
   if (HotKeyItem == NULL)
     {
       ExReleaseFastMutex (&WinStaObject->HotKeyListLock);
index d4c962a..0d1e09a 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: keyboard.c,v 1.23 2004/02/19 06:59:50 arty Exp $
+/* $Id: keyboard.c,v 1.24 2004/02/19 21:12:09 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -40,6 +40,7 @@
 #include <include/error.h>
 #include <include/object.h>
 #include <include/winsta.h>
+#include <include/tags.h>
 #include <rosrtl/string.h>
 
 #define NDEBUG
@@ -376,8 +377,9 @@ NTSTATUS NTAPI AppendUnicodeString(PUNICODE_STRING ResultFirst,
                                   BOOL Deallocate) {
     NTSTATUS Status;
     PWSTR new_string = 
-       ExAllocatePool(PagedPool,
-                      (ResultFirst->Length + Second->Length + sizeof(WCHAR)));
+       ExAllocatePoolWithTag(PagedPool,
+                             (ResultFirst->Length + Second->Length + sizeof(WCHAR)),
+                             TAG_STRING);
     if( !new_string ) {
        return STATUS_NO_MEMORY;
     }
@@ -436,7 +438,7 @@ static NTSTATUS NTAPI ReadRegistryValue( PUNICODE_STRING KeyName,
     
     ResLength += sizeof( *KeyValuePartialInfo );
     KeyValuePartialInfo = 
-       ExAllocatePool(PagedPool, ResLength);
+       ExAllocatePoolWithTag(PagedPool, ResLength, TAG_STRING);
     Length = ResLength;
     
     if( !KeyValuePartialInfo ) {
@@ -533,9 +535,9 @@ void InitKbdLayout( PVOID *pkKeyboardLayout ) {
 
        RtlFreeUnicodeString(&LayoutFile);
 
-       KeyboardLayoutWSTR = ExAllocatePool(PagedPool,
-                                           (FullLayoutPath.Length + 1) * 
-                                           sizeof(WCHAR));
+       KeyboardLayoutWSTR = ExAllocatePoolWithTag(PagedPool,
+                                                  (FullLayoutPath.Length + 1) * 
+                                                  sizeof(WCHAR), TAG_STRING);
 
        if( !KeyboardLayoutWSTR ) {
          DPRINT1("Couldn't allocate a string for the keyboard layout name.\n");
@@ -837,7 +839,7 @@ NtUserToUnicodeEx(
     DPRINT1( "Couldn't copy key state from caller.\n" );
     return 0;
   }
-  OutPwszBuff = ExAllocatePool(NonPagedPool,sizeof(WCHAR) * cchBuff);
+  OutPwszBuff = ExAllocatePoolWithTag(NonPagedPool,sizeof(WCHAR) * cchBuff, TAG_STRING);
   if( !OutPwszBuff ) {
     DPRINT1( "ExAllocatePool(%d) failed\n", sizeof(WCHAR) * cchBuff);
     return 0;
index 974a744..d3f62dd 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: menu.c,v 1.45 2004/02/19 19:44:39 weiden Exp $
+/* $Id: menu.c,v 1.46 2004/02/19 21:12:09 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
 #include <include/guicheck.h>
 #include <include/window.h>
 #include <include/color.h>
+#include <include/tags.h>
 #include <internal/safe.h>
 
 #define NDEBUG
 #include <debug.h>
 
-#define TAG_MENU TAG('M', 'E', 'N', 'U')
-
 /* INTERNAL ******************************************************************/
 
 /* maximum number of menu items a menu can contain */
@@ -327,7 +326,7 @@ IntCloneMenuItems(PMENU_OBJECT Destination, PMENU_OBJECT Source)
     Old = NewMenuItem;
     if(NewMenuItem)
       NewMenuItem->Next = MenuItem;
-    NewMenuItem = ExAllocatePoolWithTag(PagedPool, sizeof(MENU_ITEM), TAG_MENU);
+    NewMenuItem = ExAllocatePoolWithTag(PagedPool, sizeof(MENU_ITEM), TAG_MENUITEM);
     if(!NewMenuItem)
       break;
     NewMenuItem->fType = MenuItem->fType;
@@ -343,7 +342,7 @@ IntCloneMenuItems(PMENU_OBJECT Destination, PMENU_OBJECT Source)
       {
         NewMenuItem->Text.Length = 0;
         NewMenuItem->Text.MaximumLength = MenuItem->Text.MaximumLength;
-        NewMenuItem->Text.Buffer = (PWSTR)ExAllocatePoolWithTag(PagedPool, MenuItem->Text.MaximumLength, TAG_MENU);
+        NewMenuItem->Text.Buffer = (PWSTR)ExAllocatePoolWithTag(PagedPool, MenuItem->Text.MaximumLength, TAG_STRING);
         if(!NewMenuItem->Text.Buffer)
         {
           ExFreePool(NewMenuItem);
@@ -748,7 +747,7 @@ IntSetMenuItemInfo(PMENU_OBJECT MenuObject, PMENU_ITEM MenuItem, PROSMENUITEMINF
       Source = (PUNICODE_STRING)lpmii->dwTypeData;
       FreeMenuText(MenuItem);
       copylen = min((UINT)Source->MaximumLength, (lpmii->cch + 1) * sizeof(WCHAR));
-      MenuItem->Text.Buffer = (PWSTR)ExAllocatePoolWithTag(PagedPool, copylen, TAG_MENU);
+      MenuItem->Text.Buffer = (PWSTR)ExAllocatePoolWithTag(PagedPool, copylen, TAG_STRING);
       if(MenuItem->Text.Buffer)
       {
         MenuItem->Text.Length = 0;
@@ -812,7 +811,7 @@ IntInsertMenuItem(PMENU_OBJECT MenuObject, UINT uItem, BOOL fByPosition,
       pos = -1;
     }
   
-  MenuItem = ExAllocatePoolWithTag(PagedPool, sizeof(MENU_ITEM), TAG_MENU);
+  MenuItem = ExAllocatePoolWithTag(PagedPool, sizeof(MENU_ITEM), TAG_MENUITEM);
   if (NULL == MenuItem)
     {
       SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
index c98afdf..8d518c8 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: message.c,v 1.49 2004/02/05 20:09:10 gvg Exp $
+/* $Id: message.c,v 1.50 2004/02/19 21:12:09 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
 #include <include/painting.h>
 #include <include/input.h>
 #include <include/desktop.h>
+#include <include/tags.h>
 #include <internal/safe.h>
 
 #define NDEBUG
 #include <debug.h>
 
-#define TAG_MSG TAG('M', 'E', 'S', 'G')
-
 /* FUNCTIONS *****************************************************************/
 
 NTSTATUS FASTCALL
index 8006741..81ef420 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: misc.c,v 1.52 2004/02/16 11:16:06 rcampbell Exp $
+/* $Id: misc.c,v 1.53 2004/02/19 21:12:09 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -27,6 +27,7 @@
 #include <include/msgqueue.h>
 #include <include/desktop.h>
 #include <include/text.h>
+#include <include/tags.h>
 
 #define NDEBUG
 #include <debug.h>
@@ -787,7 +788,7 @@ IntSafeCopyUnicodeString(PUNICODE_STRING Dest,
   {
     Src = Dest->Buffer;
     
-    Dest->Buffer = ExAllocatePool(NonPagedPool, Dest->MaximumLength);
+    Dest->Buffer = ExAllocatePoolWithTag(NonPagedPool, Dest->MaximumLength, TAG_STRING);
     if(!Dest->Buffer)
     {
       return STATUS_NO_MEMORY;
index f318532..f2bbfc0 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: msgqueue.c,v 1.66 2004/02/19 15:27:55 weiden Exp $
+/* $Id: msgqueue.c,v 1.67 2004/02/19 21:12:09 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -43,6 +43,7 @@
 #include <include/cursoricon.h>
 #include <include/focus.h>
 #include <include/caret.h>
+#include <include/tags.h>
 
 #define NDEBUG
 #include <win32k/debug1.h>
@@ -50,8 +51,6 @@
 
 /* GLOBALS *******************************************************************/
 
-#define TAG_MSGQ TAG('M', 'S', 'G', 'Q')
-
 #define SYSTEM_MESSAGE_QUEUE_SIZE           (256)
 
 static MSG SystemMessageQueue[SYSTEM_MESSAGE_QUEUE_SIZE];
@@ -788,8 +787,8 @@ MsqDispatchOneSentMessage(PUSER_MESSAGE_QUEUE MessageQueue)
   /* Notify the sender if they specified a callback. */
   if (Message->CompletionCallback != NULL)
     {
-      NotifyMessage = ExAllocatePool(NonPagedPool,
-                                    sizeof(USER_SENT_MESSAGE_NOTIFY));
+      NotifyMessage = ExAllocatePoolWithTag(NonPagedPool,
+                                           sizeof(USER_SENT_MESSAGE_NOTIFY), TAG_USRMSG);
       NotifyMessage->CompletionCallback =
        Message->CompletionCallback;
       NotifyMessage->CompletionCallbackContext =
@@ -828,7 +827,7 @@ MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
 
   KeInitializeEvent(&CompletionEvent, NotificationEvent, FALSE);
 
-  Message = ExAllocatePoolWithTag(PagedPool, sizeof(USER_SENT_MESSAGE), TAG_MSGQ);
+  Message = ExAllocatePoolWithTag(PagedPool, sizeof(USER_SENT_MESSAGE), TAG_USRMSG);
   Message->Msg.hwnd = Wnd;
   Message->Msg.message = Msg;
   Message->Msg.wParam = wParam;
@@ -980,8 +979,9 @@ MsqCreateMessageQueue(struct _ETHREAD *Thread)
 {
   PUSER_MESSAGE_QUEUE MessageQueue;
 
-  MessageQueue = (PUSER_MESSAGE_QUEUE)ExAllocatePool(PagedPool,
-                                  sizeof(USER_MESSAGE_QUEUE) + sizeof(THRDCARETINFO));
+  MessageQueue = (PUSER_MESSAGE_QUEUE)ExAllocatePoolWithTag(PagedPool,
+                                  sizeof(USER_MESSAGE_QUEUE) + sizeof(THRDCARETINFO),
+                                  TAG_MSGQ);
   if (!MessageQueue)
     {
       return NULL;
index f11f8b3..fc2159b 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: prop.c,v 1.6 2003/11/20 15:35:33 weiden Exp $
+/* $Id: prop.c,v 1.7 2004/02/19 21:12:09 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -41,6 +41,7 @@
 #include <include/callback.h>
 #include <include/msgqueue.h>
 #include <include/rect.h>
+#include <include/tags.h>
 
 //#define NDEBUG
 #include <debug.h>
@@ -215,7 +216,7 @@ IntSetProp(PWINDOW_OBJECT Wnd, ATOM Atom, HANDLE Data)
 
   if (Prop == NULL)
   {
-    Prop = ExAllocatePool(PagedPool, sizeof(PROPERTY));
+    Prop = ExAllocatePoolWithTag(PagedPool, sizeof(PROPERTY), TAG_WNDPROP);
     if (Prop == NULL)
     {
       return FALSE;
index bec0661..e3f97e8 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: scrollbar.c,v 1.26 2004/01/14 22:18:35 gvg Exp $
+/* $Id: scrollbar.c,v 1.27 2004/02/19 21:12:09 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -41,6 +41,7 @@
 #include <include/rect.h>
 #include <include/scroll.h>
 #include <include/painting.h>
+#include <include/tags.h>
 
 #define NDEBUG
 #include <debug.h>
@@ -485,7 +486,7 @@ IntCreateScrollBar(PWINDOW_OBJECT Window, LONG idObject)
   LRESULT Result;
   INT i;
 
-  psbi = ExAllocatePool(PagedPool, sizeof(SCROLLBARINFO) + sizeof(SCROLLINFO));
+  psbi = ExAllocatePoolWithTag(PagedPool, sizeof(SCROLLBARINFO) + sizeof(SCROLLINFO), TAG_SBARINFO);
   if(!psbi)
     return FALSE;
     
index 6ccf1db..0fdb492 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: timer.c,v 1.22 2004/02/10 18:11:12 navaraf Exp $
+/* $Id: timer.c,v 1.23 2004/02/19 21:12:09 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -39,6 +39,7 @@
 #include <include/window.h>
 #include <include/error.h>
 #include <include/timer.h>
+#include <include/tags.h>
 #include <messages.h>
 #include <napi/win32.h>
 
@@ -259,7 +260,7 @@ IntSetTimer(HWND hWnd, UINT_PTR nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc, B
   else
   {
     /* FIXME: use lookaside? */
-    NewTimer = ExAllocatePool(PagedPool, sizeof(MSG_TIMER_ENTRY));
+    NewTimer = ExAllocatePoolWithTag(PagedPool, sizeof(MSG_TIMER_ENTRY), TAG_TIMER);
     if(!NewTimer)
     {
       ExReleaseFastMutex(&Mutex);
@@ -436,8 +437,8 @@ TimerThreadMain(PVOID StartContext)
           break;
     }
 
-    ThreadsToDereference = (PETHREAD *)ExAllocatePool(
-       NonPagedPool, ThreadsToDereferenceCount * sizeof(PETHREAD));
+    ThreadsToDereference = (PETHREAD *)ExAllocatePoolWithTag(
+       NonPagedPool, ThreadsToDereferenceCount * sizeof(PETHREAD), TAG_TIMERTD);
 
     EnumEntry = TimerListHead.Flink;
     while (EnumEntry != &TimerListHead)
@@ -573,7 +574,7 @@ InitTimerImpl(VOID)
   KeInitializeTimer(&Timer);
   ExInitializeFastMutex(&Mutex);
   
-  HandleLessTimersBitMapBuffer = ExAllocatePool(PagedPool, BitmapBytes);
+  HandleLessTimersBitMapBuffer = ExAllocatePoolWithTag(PagedPool, BitmapBytes, TAG_TIMERBMP);
   RtlInitializeBitMap(&HandleLessTimersBitMap,
                       HandleLessTimersBitMapBuffer,
                       BitmapBytes * 8);
index b881ded..0a7b6d0 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: window.c,v 1.184 2004/02/15 20:50:56 gvg Exp $
+/* $Id: window.c,v 1.185 2004/02/19 21:12:09 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
 #include <include/focus.h>
 #include <include/hook.h>
 #include <include/useratom.h>
+#include <include/tags.h>
 
 #define NDEBUG
 #include <win32k/debug1.h>
 #include <debug.h>
 
-#define TAG_WNAM  TAG('W', 'N', 'A', 'M')
-
 static WndProcHandle *WndProcHandlesArray = 0;
 static WORD WndProcHandlesArraySize = 0;
 #define WPH_SIZE 0x40 /* the size to add to the WndProcHandle array each time */
@@ -76,7 +75,7 @@ static WORD WndProcHandlesArraySize = 0;
 NTSTATUS FASTCALL
 InitWindowImpl(VOID)
 {
-   WndProcHandlesArray = ExAllocatePool(PagedPool,WPH_SIZE * sizeof(WndProcHandle));
+   WndProcHandlesArray = ExAllocatePoolWithTag(PagedPool,WPH_SIZE * sizeof(WndProcHandle), TAG_WINPROCLST);
    WndProcHandlesArraySize = WPH_SIZE;
    return STATUS_SUCCESS;
 }
@@ -227,7 +226,7 @@ IntWinListChildren(PWINDOW_OBJECT Window)
   
    if (NumChildren != 0)
    {
-      List = ExAllocatePool(PagedPool, (NumChildren + 1) * sizeof(HWND));
+      List = ExAllocatePoolWithTag(PagedPool, (NumChildren + 1) * sizeof(HWND), TAG_WINLIST);
       if (List != NULL)
       {
          for (Child = Window->FirstChild, Index = 0;
@@ -3201,7 +3200,7 @@ NtUserSetWindowPlacement(HWND hWnd,
   WinPosShowWindow(WindowObject->Self, Safepl.showCmd);
 
   if (WindowObject->InternalPos == NULL)
-     WindowObject->InternalPos = ExAllocatePool(PagedPool, sizeof(INTERNALPOS));
+     WindowObject->InternalPos = ExAllocatePoolWithTag(PagedPool, sizeof(INTERNALPOS), TAG_WININTLIST);
   WindowObject->InternalPos->NormalRect = Safepl.rcNormalPosition;
   WindowObject->InternalPos->IconPos = Safepl.ptMinPosition;
   WindowObject->InternalPos->MaxPos = Safepl.ptMaxPosition;
@@ -3584,7 +3583,7 @@ IntAddWndProcHandle(WNDPROC WindowProc, BOOL IsUnicode)
        {
                OldArray = WndProcHandlesArray;
                OldArraySize = WndProcHandlesArraySize;
-        WndProcHandlesArray = ExAllocatePool(PagedPool,(OldArraySize + WPH_SIZE) * sizeof(WndProcHandle));
+        WndProcHandlesArray = ExAllocatePoolWithTag(PagedPool,(OldArraySize + WPH_SIZE) * sizeof(WndProcHandle), TAG_WINPROCLST);
                WndProcHandlesArraySize = OldArraySize + WPH_SIZE;
                RtlCopyMemory(WndProcHandlesArray,OldArray,OldArraySize * sizeof(WndProcHandle));
                ExFreePool(OldArray);
index aa9871e..f0b7c19 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: winpos.c,v 1.91 2004/02/19 15:27:55 weiden Exp $
+/* $Id: winpos.c,v 1.92 2004/02/19 21:12:09 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -45,6 +45,7 @@
 #include <include/dce.h>
 #include <include/vis.h>
 #include <include/focus.h>
+#include <include/tags.h>
 
 #define NDEBUG
 #include <debug.h>
@@ -172,7 +173,7 @@ WinPosInitInternalPos(PWINDOW_OBJECT WindowObject, POINT pt, PRECT RestoreRect)
       else
         WorkArea = WindowObject->Parent->ClientRect;
       
-      WindowObject->InternalPos = ExAllocatePool(NonPagedPool, sizeof(INTERNALPOS));
+      WindowObject->InternalPos = ExAllocatePoolWithTag(NonPagedPool, sizeof(INTERNALPOS), TAG_WININTLIST);
       if(!WindowObject->InternalPos)
       {
         DPRINT1("Failed to allocate INTERNALPOS structure for window 0x%x\n", WindowObject->Self);
index 2d7c102..c2459ed 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *  $Id: winsta.c,v 1.55 2004/01/15 16:29:10 gvg Exp $
+ *  $Id: winsta.c,v 1.56 2004/02/19 21:12:10 weiden Exp $
  *
  *  COPYRIGHT:        See COPYING in the top level directory
  *  PROJECT:          ReactOS kernel
@@ -52,6 +52,7 @@
 #include <include/callback.h>
 #include <include/guicheck.h>
 #include <include/intgdi.h>
+#include <include/tags.h>
 /* Needed for DIRECTORY_OBJECT */
 #include <internal/ob.h>
 
@@ -124,7 +125,7 @@ IntGetFullWindowStationName(
       FullName->Length += WinStaName->Length + sizeof(WCHAR);
    if (DesktopName != NULL)
       FullName->Length += DesktopName->Length + sizeof(WCHAR);
-   FullName->Buffer = ExAllocatePool(NonPagedPool, FullName->Length);
+   FullName->Buffer = ExAllocatePoolWithTag(NonPagedPool, FullName->Length, TAG_STRING);
    if (FullName->Buffer == NULL)
    {
       return FALSE;
index 7020c0d..edf7c4e 100644 (file)
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: bezier.c,v 1.4 2003/08/11 21:10:49 royce Exp $ */
+/* $Id: bezier.c,v 1.5 2004/02/19 21:12:10 weiden Exp $ */
 #include <windows.h>
 #include <ddk/ntddk.h>
 #include <math.h>
+#include <include/tags.h>
 
 /******************************************************************
  * 
@@ -154,7 +155,7 @@ static void STDCALL GDI_InternalBezier( POINT *Points, POINT **PtsOut, INT *dwOu
 {
   if(*nPtsOut == *dwOut) {
     *dwOut *= 2;
-    *PtsOut = ExAllocatePool(NonPagedPool, *dwOut * sizeof(POINT));
+    *PtsOut = ExAllocatePoolWithTag(NonPagedPool, *dwOut * sizeof(POINT), TAG_BEZIER);
   }
 
   if(!level || BezierCheck(level, Points)) {
@@ -218,7 +219,7 @@ POINT * FASTCALL GDI_Bezier( const POINT *Points, INT count, INT *nPtsOut )
     return NULL;
   }
   *nPtsOut = 0;
-  out = ExAllocatePool(NonPagedPool, dwOut * sizeof(POINT));
+  out = ExAllocatePoolWithTag(NonPagedPool, dwOut * sizeof(POINT), TAG_BEZIER);
   for(Bezier = 0; Bezier < (count-1)/3; Bezier++) {
     POINT ptBuf[4];
     memcpy(ptBuf, Points + Bezier * 3, sizeof(POINT) * 4);
index e90ef97..1085bff 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: bitmaps.c,v 1.54 2004/02/12 21:50:19 navaraf Exp $ */
+/* $Id: bitmaps.c,v 1.55 2004/02/19 21:12:10 weiden Exp $ */
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <stdlib.h>
@@ -32,6 +32,7 @@
 #include <include/error.h>
 #include <include/surface.h>
 #include <include/palette.h>
+#include <include/tags.h>
 
 #define NDEBUG
 #include <win32k/debug1.h>
@@ -290,7 +291,7 @@ HBITMAP STDCALL NtGdiCreateBitmap(INT  Width,
   bmp->dib = NULL;
 
   // Allocate memory for bitmap bits
-  bmp->bitmap.bmBits = ExAllocatePool(PagedPool, bmp->bitmap.bmWidthBytes * bmp->bitmap.bmHeight);
+  bmp->bitmap.bmBits = ExAllocatePoolWithTag(PagedPool, bmp->bitmap.bmWidthBytes * bmp->bitmap.bmHeight, TAG_BITMAP);
 
   BITMAPOBJ_UnlockBitmap( hBitmap );
 
@@ -729,7 +730,7 @@ LONG STDCALL NtGdiSetBitmapBits(HBITMAP  hBitmap,
       /* FIXME: Alloc enough for entire bitmap */
       if (bmp->bitmap.bmBits == NULL)
       {
-        bmp->bitmap.bmBits = ExAllocatePool (PagedPool, Bytes);
+        bmp->bitmap.bmBits = ExAllocatePoolWithTag(PagedPool, Bytes, TAG_BITMAP);
       }
       if(!bmp->bitmap.bmBits)
       {
@@ -1060,7 +1061,7 @@ HBITMAP FASTCALL BITMAPOBJ_CopyBitmap(HBITMAP  hBitmap)
   {
     char *buf;
 
-    buf = ExAllocatePool (NonPagedPool, bm.bmWidthBytes * bm.bmHeight);
+    buf = ExAllocatePoolWithTag (NonPagedPool, bm.bmWidthBytes * bm.bmHeight, TAG_BITMAP);
     NtGdiGetBitmapBits (hBitmap, bm.bmWidthBytes * bm.bmHeight, buf);
     NtGdiSetBitmapBits (res, bm.bmWidthBytes * bm.bmHeight, buf);
     ExFreePool (buf);
index 71e8471..988633f 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: brush.c,v 1.31 2004/01/15 21:03:05 gvg Exp $
+/* $Id: brush.c,v 1.32 2004/02/19 21:12:10 weiden Exp $
  */
 
 
@@ -30,6 +30,7 @@
 #include <include/object.h>
 #include <include/inteng.h>
 #include <include/error.h>
+#include <include/tags.h>
 
 #define NDEBUG
 #include <win32k/debug1.h>
@@ -335,7 +336,7 @@ BOOL STDCALL NtGdiPolyPatBlt(HDC hDC,
     
        if(cRects > 0)
        {
-         rb = ExAllocatePool(PagedPool, sizeof(PATRECT) * cRects);
+         rb = ExAllocatePoolWithTag(PagedPool, sizeof(PATRECT) * cRects, TAG_PATBLT);
          if(!rb)
          {
            SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
index db36ccf..ab723de 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: coord.c,v 1.21 2004/01/04 21:26:59 weiden Exp $
+/* $Id: coord.c,v 1.22 2004/02/19 21:12:10 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -33,6 +33,7 @@
 #include <win32k/coord.h>
 #include <win32k/dc.h>
 #include <include/error.h>
+#include <include/tags.h>
 #define NDEBUG
 #include <win32k/debug1.h>
 
@@ -155,7 +156,7 @@ NtGdiDPtoLP(HDC  hDC,
    
    Size = Count * sizeof(POINT);
    
-   Points = (LPPOINT)ExAllocatePool(PagedPool, Size);
+   Points = (LPPOINT)ExAllocatePoolWithTag(PagedPool, Size, TAG_COORD);
    if(!Points)
    {
      DC_UnlockDc(hDC);
@@ -304,7 +305,7 @@ NtGdiLPtoDP ( HDC hDC, LPPOINT UnsafePoints, INT Count )
    
    Size = Count * sizeof(POINT);
    
-   Points = (LPPOINT)ExAllocatePool(PagedPool, Size);
+   Points = (LPPOINT)ExAllocatePoolWithTag(PagedPool, Size, TAG_COORD);
    if(!Points)
    {
      DC_UnlockDc(hDC);
index 6e547e3..b709d7d 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: dc.c,v 1.120 2004/02/01 15:45:41 gvg Exp $
+/* $Id: dc.c,v 1.121 2004/02/19 21:12:10 weiden Exp $
  *
  * DC.C - Device context functions
  *
 #include <include/desktop.h>
 #include <include/intgdi.h>
 #include <include/cleanup.h>
+#include <include/tags.h>
 
 #define NDEBUG
 #include <win32k/debug1.h>
 
-#define TAG_DC  TAG('D', 'C', 'D', 'C')
-
 static GDIDEVICE PrimarySurface;
 
 /* FIXME: DCs should probably be thread safe  */
@@ -1455,7 +1454,7 @@ NtGdiGetObject(HANDLE handle, INT count, LPVOID buffer)
     return 0;
   }
   
-  SafeBuf = ExAllocatePool(NonPagedPool, count);
+  SafeBuf = ExAllocatePoolWithTag(NonPagedPool, count, TAG_GDIOBJ);
   if(!SafeBuf)
   {
     SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
index bef8395..1992312 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dib.c,v 1.41 2004/02/11 17:56:29 navaraf Exp $
+ * $Id: dib.c,v 1.42 2004/02/19 21:12:10 weiden Exp $
  *
  * ReactOS W32 Subsystem
  * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
@@ -34,6 +34,7 @@
 #include <internal/safe.h>
 #include <include/surface.h>
 #include <include/palette.h>
+#include <include/tags.h>
 
 #define NDEBUG
 #include <win32k/debug1.h>
@@ -993,7 +994,7 @@ DIB_CreateDIBSection(
   // Allocate Memory for DIB and fill structure
   if (bm.bmBits)
   {
-    dib = ExAllocatePool(PagedPool, sizeof(DIBSECTION));
+    dib = ExAllocatePoolWithTag(PagedPool, sizeof(DIBSECTION), TAG_DIB);
     RtlZeroMemory(dib, sizeof(DIBSECTION));
   }
 
@@ -1058,7 +1059,7 @@ DIB_CreateDIBSection(
     if(bi->biBitCount == 4) { Entries = 16; } else
     if(bi->biBitCount == 8) { Entries = 256; }
 
-    bmp->ColorMap = ExAllocatePool(NonPagedPool, sizeof(RGBQUAD)*Entries);
+    bmp->ColorMap = ExAllocatePoolWithTag(NonPagedPool, sizeof(RGBQUAD)*Entries, TAG_COLORMAP);
     RtlCopyMemory(bmp->ColorMap, bmi->bmiColors, sizeof(RGBQUAD)*Entries);
   }
 
@@ -1236,7 +1237,7 @@ DIB_MapPaletteColors(PDC dc, CONST BITMAPINFO* lpbmi)
       nNumColors = min(nNumColors, lpbmi->bmiHeader.biClrUsed);
     }
 
-  lpRGB = (RGBQUAD *)ExAllocatePool(NonPagedPool, sizeof(RGBQUAD) * nNumColors);
+  lpRGB = (RGBQUAD *)ExAllocatePoolWithTag(NonPagedPool, sizeof(RGBQUAD) * nNumColors, TAG_COLORMAP);
   lpIndex = (DWORD *)&lpbmi->bmiColors[0];
 
   for (i = 0; i < nNumColors; i++)
@@ -1309,7 +1310,7 @@ BuildDIBPalette (PBITMAPINFO bmi, PINT paletteType)
 
   if (PAL_INDEXED == *paletteType)
     {
-      palEntries = ExAllocatePool(NonPagedPool, sizeof(PALETTEENTRY)*ColorCount);
+      palEntries = ExAllocatePoolWithTag(NonPagedPool, sizeof(PALETTEENTRY)*ColorCount, TAG_COLORMAP);
       DIBColorTableToPaletteEntries(palEntries, bmi->bmiColors, ColorCount);
     }
   hPal = PALETTE_AllocPalette( *paletteType, ColorCount, (ULONG*)palEntries, 0, 0, 0 );
index c5d9a97..4b77c93 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: fillshap.c,v 1.40 2004/02/08 21:37:53 weiden Exp $ */
+/* $Id: fillshap.c,v 1.41 2004/02/19 21:12:10 weiden Exp $ */
 
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
@@ -34,6 +34,7 @@
 #include <include/palette.h>
 #include <include/eng.h>
 #include <include/intgdi.h>
+#include <include/tags.h>
 #include <internal/safe.h>
 
 #define NDEBUG
@@ -700,7 +701,7 @@ NtGdiPie(HDC  hDC,
   /* Number of points for the circle is 4 * sqrt(2) * Radius, start
      and end line have at most Radius points, so allocate at least
      that much */
-  ShapePoints = ExAllocatePool(PagedPool, 8 * (Right - Left + 1) / 2 * sizeof(SHAPEPOINT));
+  ShapePoints = ExAllocatePoolWithTag(PagedPool, 8 * (Right - Left + 1) / 2 * sizeof(SHAPEPOINT), TAG_SHAPE);
   if (NULL == ShapePoints)
     {
       BRUSHOBJ_UnlockBrush(dc->w.hBrush);
@@ -850,7 +851,7 @@ NtGdiPolygon(HDC          hDC,
   
   if(Count >= 2)
   {
-    Safept = ExAllocatePool(NonPagedPool, sizeof(POINT) * Count);
+    Safept = ExAllocatePoolWithTag(NonPagedPool, sizeof(POINT) * Count, TAG_SHAPE);
     if(!Safept)
     {
       DC_UnlockDc(hDC);
@@ -905,7 +906,7 @@ NtGdiPolyPolygon(HDC           hDC,
   
   if(Count > 0)
   {
-    Safept = ExAllocatePool(NonPagedPool, (sizeof(POINT) + sizeof(INT)) * Count);
+    Safept = ExAllocatePoolWithTag(NonPagedPool, (sizeof(POINT) + sizeof(INT)) * Count, TAG_SHAPE);
     if(!Safept)
     {
       DC_UnlockDc(hDC);
@@ -1474,7 +1475,7 @@ NtGdiGradientFill(
       return FALSE;
   }
 
-  if(!(SafeVertex = ExAllocatePool(PagedPool, (uVertex * sizeof(TRIVERTEX)) + SizeMesh)))
+  if(!(SafeVertex = ExAllocatePoolWithTag(PagedPool, (uVertex * sizeof(TRIVERTEX)) + SizeMesh, TAG_SHAPE)))
   {
     DC_UnlockDc(hdc);
     SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
index d2cb7ed..e79f779 100644 (file)
@@ -19,7 +19,7 @@
 /*
  * GDIOBJ.C - GDI object manipulation routines
  *
- * $Id: gdiobj.c,v 1.59 2004/02/01 09:58:30 mf Exp $
+ * $Id: gdiobj.c,v 1.60 2004/02/19 21:12:10 weiden Exp $
  *
  */
 
@@ -39,6 +39,7 @@
 #include <win32k/cursoricon.h>
 #include <include/palette.h>
 #include <include/intgdi.h>
+#include <include/tags.h>
 #define NDEBUG
 #include <win32k/debug1.h>
 
@@ -169,9 +170,9 @@ GDIOBJ_iAllocHandleTable (WORD Size)
   /* prevent APC delivery for the *FastMutexUnsafe calls */
   const KIRQL PrevIrql = KfRaiseIrql(APC_LEVEL);
   ExAcquireFastMutexUnsafe (&HandleTableMutex);
-  handleTable = ExAllocatePool(PagedPool,
-                               sizeof(GDI_HANDLE_TABLE) +
-                               sizeof(PGDIOBJ) * Size);
+  handleTable = ExAllocatePoolWithTag(PagedPool,
+                                     sizeof(GDI_HANDLE_TABLE) +
+                                     sizeof(PGDIOBJ) * Size, TAG_GDIHNDTBLE);
   ASSERT( handleTable );
   memset (handleTable,
           0,
@@ -261,7 +262,7 @@ GDIOBJ_AllocObj(WORD Size, DWORD ObjectType, GDICLEANUPPROC CleanupProc)
     }
 
   DPRINT("GDIOBJ_AllocObj: handle: %d, size: %d, type: 0x%08x\n", Index, Size, ObjectType);
-  newObject = ExAllocatePool(PagedPool, Size + sizeof (GDIOBJHDR));
+  newObject = ExAllocatePoolWithTag(PagedPool, Size + sizeof (GDIOBJHDR), TAG_GDIOBJ);
   if (newObject == NULL)
   {
     DPRINT1("GDIOBJ_AllocObj: failed\n");
index 4ddc288..2048e21 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: line.c,v 1.26 2003/12/13 10:57:29 weiden Exp $ */
+/* $Id: line.c,v 1.27 2004/02/19 21:12:10 weiden Exp $ */
 
 // Some code from the WINE project source (www.winehq.com)
 
@@ -34,6 +34,7 @@
 #include <include/object.h>
 #include <include/path.h>
 #include <include/intgdi.h>
+#include <include/tags.h>
 
 #define NDEBUG
 #include <win32k/debug1.h>
@@ -180,7 +181,7 @@ IntGdiPolyBezierTo(DC      *dc,
   else /* We'll do it using PolyBezier */
   {
     POINT *npt;
-    npt = ExAllocatePool(NonPagedPool, sizeof(POINT) * (Count + 1));
+    npt = ExAllocatePoolWithTag(NonPagedPool, sizeof(POINT) * (Count + 1), TAG_BEZIER);
     if ( npt )
     {
       npt[0].x = dc->w.CursPosX;
@@ -222,7 +223,7 @@ IntGdiPolyline(DC      *dc,
   //FIXME: Do somthing with reg...
 
   //Allocate "Count" bytes of memory to hold a safe copy of pt
-  pts = (POINT*)ExAllocatePool ( NonPagedPool, sizeof(POINT)*Count );
+  pts = (POINT*)ExAllocatePoolWithTag ( NonPagedPool, sizeof(POINT)*Count, TAG_SHAPE );
   if ( pts )
   {
     // safely copy pt to local version
@@ -269,7 +270,7 @@ IntGdiPolylineTo(DC      *dc,
   }
   else /* do it using Polyline */
   {
-    POINT *pts = ExAllocatePool(NonPagedPool, sizeof(POINT) * (Count + 1));
+    POINT *pts = ExAllocatePoolWithTag(NonPagedPool, sizeof(POINT) * (Count + 1), TAG_SHAPE);
     if ( pts )
     {
       pts[0].x = dc->w.CursPosX;
@@ -540,7 +541,7 @@ NtGdiPolyBezier(HDC           hDC,
   
   if(Count > 0)
   {
-    Safept = ExAllocatePool(NonPagedPool, sizeof(POINT) * Count);
+    Safept = ExAllocatePoolWithTag(NonPagedPool, sizeof(POINT) * Count, TAG_BEZIER);
     if(!Safept)
     {
       DC_UnlockDc(hDC);
@@ -591,7 +592,7 @@ NtGdiPolyBezierTo(HDC  hDC,
   
   if(Count > 0)
   {
-    Safept = ExAllocatePool(NonPagedPool, sizeof(POINT) * Count);
+    Safept = ExAllocatePoolWithTag(NonPagedPool, sizeof(POINT) * Count, TAG_BEZIER);
     if(!Safept)
     {
       DC_UnlockDc(hDC);
@@ -652,7 +653,7 @@ NtGdiPolyline(HDC            hDC,
   
   if(Count >= 2)
   {
-    Safept = ExAllocatePool(NonPagedPool, sizeof(POINT) * Count);
+    Safept = ExAllocatePoolWithTag(NonPagedPool, sizeof(POINT) * Count, TAG_SHAPE);
     if(!Safept)
     {
       DC_UnlockDc(hDC);
@@ -703,7 +704,7 @@ NtGdiPolylineTo(HDC            hDC,
   
   if(Count > 0)
   {
-    Safept = ExAllocatePool(NonPagedPool, sizeof(POINT) * Count);
+    Safept = ExAllocatePoolWithTag(NonPagedPool, sizeof(POINT) * Count, TAG_SHAPE);
     if(!Safept)
     {
       DC_UnlockDc(hDC);
@@ -756,7 +757,7 @@ NtGdiPolyPolyline(HDC            hDC,
   
   if(Count > 0)
   {
-    Safept = ExAllocatePool(NonPagedPool, (sizeof(POINT) + sizeof(DWORD)) * Count);
+    Safept = ExAllocatePoolWithTag(NonPagedPool, (sizeof(POINT) + sizeof(DWORD)) * Count, TAG_SHAPE);
     if(!Safept)
     {
       DC_UnlockDc(hDC);
index 9168d0d..64f7279 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: palette.c,v 1.14 2003/12/20 10:31:32 navaraf Exp $ */
+/* $Id: palette.c,v 1.15 2004/02/19 21:12:10 weiden Exp $ */
 
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
@@ -29,6 +29,7 @@
 #include <include/palette.h>
 #include <include/object.h>
 #include <include/color.h>
+#include <include/tags.h>
 
 static int           PALETTE_firstFree = 0; 
 static unsigned char PALETTE_freeList[256];
@@ -81,7 +82,7 @@ PALETTE_AllocPalette(ULONG Mode,
 
   if (NULL != Colors)
     {
-      PalGDI->IndexedColors = ExAllocatePool(NonPagedPool, sizeof(PALETTEENTRY) * NumColors);
+      PalGDI->IndexedColors = ExAllocatePoolWithTag(NonPagedPool, sizeof(PALETTEENTRY) * NumColors, TAG_PALETTE);
       if (NULL == PalGDI->IndexedColors)
        {
          PALETTE_UnlockPalette(NewPalette);
@@ -117,7 +118,7 @@ HPALETTE FASTCALL PALETTE_Init(VOID)
   const PALETTEENTRY* __sysPalTemplate = (const PALETTEENTRY*)COLOR_GetSystemPaletteTemplate();
 
   // create default palette (20 system colors)
-  palPtr = ExAllocatePool(NonPagedPool, sizeof(LOGPALETTE) + (NB_RESERVED_COLORS * sizeof(PALETTEENTRY)));
+  palPtr = ExAllocatePoolWithTag(NonPagedPool, sizeof(LOGPALETTE) + (NB_RESERVED_COLORS * sizeof(PALETTEENTRY)), TAG_PALETTE);
   if (!palPtr) return FALSE;
 
   palPtr->palVersion = 0x300;
@@ -201,7 +202,7 @@ INT STDCALL PALETTE_SetMapping(PPALOBJ palPtr, UINT uStart, UINT uNum, BOOL mapO
   //mapping = HeapReAlloc( GetProcessHeap(), 0, palPtr->mapping,
   //                       sizeof(int)*palPtr->logpalette->palNumEntries);
   ExFreePool(palPtr->mapping);
-  mapping = ExAllocatePool(NonPagedPool, sizeof(int)*palGDI->NumColors);
+  mapping = ExAllocatePoolWithTag(NonPagedPool, sizeof(int)*palGDI->NumColors, TAG_PALETTEMAP);
 
   palPtr->mapping = mapping;
 
index 5f97188..8751628 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: path.c,v 1.17 2003/12/13 10:18:01 weiden Exp $ */
+/* $Id: path.c,v 1.18 2004/02/19 21:12:10 weiden Exp $ */
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <ddk/ntddk.h>
@@ -31,6 +31,7 @@
 #include <include/object.h>
 #include <include/path.h>
 #include <include/intgdi.h>
+#include <include/tags.h>
 
 #include <math.h>
 #include <float.h>
@@ -858,7 +859,7 @@ PATH_PathToRegion ( const GdiPath *pPath, INT nPolyFillMode, HRGN *pHrgn )
       numStrokes++;
 
   /* Allocate memory for number-of-points-in-stroke array */
-  pNumPointsInStroke=(int *)ExAllocatePool(NonPagedPool, sizeof(int) * numStrokes);
+  pNumPointsInStroke=(int *)ExAllocatePoolWithTag(NonPagedPool, sizeof(int) * numStrokes, TAG_PATH);
   if(!pNumPointsInStroke)
   {
 //    SetLastError(ERROR_NOT_ENOUGH_MEMORY);
@@ -981,10 +982,10 @@ PATH_ReserveEntries ( GdiPath *pPath, INT numEntries )
        numEntriesToAllocate=numEntries;
 
     /* Allocate new arrays */
-    pPointsNew=(POINT *)ExAllocatePool(NonPagedPool, numEntriesToAllocate * sizeof(POINT));
+    pPointsNew=(POINT *)ExAllocatePoolWithTag(NonPagedPool, numEntriesToAllocate * sizeof(POINT), TAG_PATH);
     if(!pPointsNew)
       return FALSE;
-    pFlagsNew=(BYTE *)ExAllocatePool(NonPagedPool, numEntriesToAllocate * sizeof(BYTE));
+    pFlagsNew=(BYTE *)ExAllocatePoolWithTag(NonPagedPool, numEntriesToAllocate * sizeof(BYTE), TAG_PATH);
     if(!pFlagsNew)
     {
       ExFreePool(pPointsNew);
index 41435da..c9d09ac 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: print.c,v 1.13 2004/02/18 02:37:18 royce Exp $ */
+/* $Id: print.c,v 1.14 2004/02/19 21:12:10 weiden Exp $ */
 
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
@@ -24,6 +24,7 @@
 #include <win32k/print.h>
 #include <win32k/dc.h>
 #include <include/error.h>
+#include <include/tags.h>
 #include <internal/safe.h>
 
 #define NDEBUG
@@ -131,7 +132,7 @@ NtGdiExtEscape(
 
    if ( InSize && UnsafeInData )
    {
-      SafeInData = ExAllocatePool ( NonPagedPool, InSize );
+      SafeInData = ExAllocatePoolWithTag ( NonPagedPool, InSize, TAG_PRINT );
       if ( !SafeInData )
       {
          DC_UnlockDc(hDC);
@@ -150,7 +151,7 @@ NtGdiExtEscape(
 
    if ( OutSize && UnsafeOutData )
    {
-      SafeOutData = ExAllocatePool ( NonPagedPool, OutSize );
+      SafeOutData = ExAllocatePoolWithTag ( NonPagedPool, OutSize, TAG_PRINT );
       if ( !SafeOutData )
       {
          if ( SafeInData )
index 966aa32..3ae533b 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: region.c,v 1.41 2004/02/11 17:56:29 navaraf Exp $ */
+/* $Id: region.c,v 1.42 2004/02/19 21:12:10 weiden Exp $ */
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <ddk/ntddk.h>
@@ -31,6 +31,7 @@
 #include <include/object.h>
 #include <include/inteng.h>
 #include <include/error.h>
+#include <include/tags.h>
 
 #define NDEBUG
 #include <win32k/debug1.h>
@@ -71,7 +72,7 @@ IntEngPaint(IN SURFOBJ *Surface,IN CLIPOBJ *ClipRegion,IN BRUSHOBJ *Brush,IN POI
 static inline int xmemcheck(ROSRGNDATA *reg, LPRECT *rect, LPRECT *firstrect ) {
        if ( (reg->rdh.nCount+1)*sizeof( RECT ) >= reg->rdh.nRgnSize ) {
                PRECT temp;
-               temp = ExAllocatePool( PagedPool, (2 * (reg->rdh.nRgnSize)));
+               temp = ExAllocatePoolWithTag( PagedPool, (2 * (reg->rdh.nRgnSize)), TAG_REGION);
 
                if (temp == 0)
                    return 0;
@@ -136,7 +137,7 @@ static BOOL FASTCALL REGION_CopyRegion(PROSRGNDATA dst, PROSRGNDATA src)
     {
          PCHAR temp;
 
-         temp = ExAllocatePool(PagedPool, src->rdh.nCount * sizeof(RECT) );
+         temp = ExAllocatePoolWithTag(PagedPool, src->rdh.nCount * sizeof(RECT), TAG_REGION );
          if( !temp )
                return FALSE;
 
@@ -214,7 +215,7 @@ static BOOL FASTCALL REGION_CropAndOffsetRegion(const PPOINT off, const PRECT re
         return TRUE;
     }
     else{
-      xrect = ExAllocatePool(PagedPool, rgnSrc->rdh.nCount * sizeof(RECT));
+      xrect = ExAllocatePoolWithTag(PagedPool, rgnSrc->rdh.nCount * sizeof(RECT), TAG_REGION);
          if( rgnDst->Buffer )
                ExFreePool( rgnDst->Buffer ); //free the old buffer. will be assigned to xrect below.
        }
@@ -274,7 +275,7 @@ static BOOL FASTCALL REGION_CropAndOffsetRegion(const PPOINT off, const PRECT re
     if((rgnDst != rgnSrc) && (rgnDst->rdh.nCount < (i = (clipb - clipa))))
     {
          PCHAR temp;
-         temp = ExAllocatePool( PagedPool, i * sizeof(RECT) );
+         temp = ExAllocatePoolWithTag( PagedPool, i * sizeof(RECT), TAG_REGION );
       if(!temp)
              return FALSE;
 
@@ -339,7 +340,7 @@ static BOOL FASTCALL REGION_CropAndOffsetRegion(const PPOINT off, const PRECT re
 empty:
        if(!rgnDst->Buffer)
        {
-         rgnDst->Buffer = (char*)ExAllocatePool(PagedPool, RGN_DEFAULT_RECTS * sizeof(RECT));
+         rgnDst->Buffer = (char*)ExAllocatePoolWithTag(PagedPool, RGN_DEFAULT_RECTS * sizeof(RECT), TAG_REGION);
          if(rgnDst->Buffer){
            rgnDst->rdh.nCount = RGN_DEFAULT_RECTS;
                rgnDst->rdh.nRgnSize = RGN_DEFAULT_RECTS * sizeof(RECT);
@@ -619,7 +620,7 @@ REGION_RegionOp(
      */
     newReg->rdh.nRgnSize = max(reg1->rdh.nCount,reg2->rdh.nCount) * 2 * sizeof(RECT);
 
-    if (! (newReg->Buffer = ExAllocatePool( PagedPool, newReg->rdh.nRgnSize )))
+    if (! (newReg->Buffer = ExAllocatePoolWithTag( PagedPool, newReg->rdh.nRgnSize, TAG_REGION )))
     {
                newReg->rdh.nRgnSize = 0;
                return;
@@ -809,7 +810,7 @@ REGION_RegionOp(
                if (REGION_NOT_EMPTY(newReg))
                {
                    RECT *prev_rects = (PRECT)newReg->Buffer;
-                   newReg->Buffer = ExAllocatePool( PagedPool, newReg->rdh.nCount*sizeof(RECT) );
+                   newReg->Buffer = ExAllocatePoolWithTag( PagedPool, newReg->rdh.nCount*sizeof(RECT), TAG_REGION );
 
                    if (! newReg->Buffer)
                                newReg->Buffer = (char*)prev_rects;
@@ -827,7 +828,7 @@ REGION_RegionOp(
                     */
                    newReg->rdh.nRgnSize = sizeof(RECT);
                    ExFreePool( newReg->Buffer );
-                   newReg->Buffer = ExAllocatePool( PagedPool, sizeof(RECT) );
+                   newReg->Buffer = ExAllocatePoolWithTag( PagedPool, sizeof(RECT), TAG_REGION );
                        ASSERT( newReg->Buffer );
                }
     }
@@ -1476,7 +1477,7 @@ HRGN FASTCALL RGNDATA_AllocRgn(INT n)
                                    (GDICLEANUPPROC) RGNDATA_InternalDelete))){
        if( (pReg = RGNDATA_LockRgn(hReg)) ){
 
-      if ((pReg->Buffer = ExAllocatePool(PagedPool, n * sizeof(RECT)))){
+      if ((pReg->Buffer = ExAllocatePoolWithTag(PagedPool, n * sizeof(RECT), TAG_REGION))){
        EMPTY_REGION(pReg);
        pReg->rdh.dwSize = sizeof(RGNDATAHEADER);
        pReg->rdh.nCount = n;
index 03c051a..52b0d07 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: text.c,v 1.73 2004/02/11 21:52:28 sedwards Exp $ */
+/* $Id: text.c,v 1.74 2004/02/19 21:12:10 weiden Exp $ */
 
 
 #undef WIN32_LEAN_AND_MEAN
@@ -40,6 +40,7 @@
 #include <include/text.h>
 #include <include/eng.h>
 #include <include/palette.h>
+#include <include/tags.h>
 
 #define NDEBUG
 #include <win32k/debug1.h>
@@ -155,7 +156,7 @@ IntGdiAddFontResource(PUNICODE_STRING Filename, DWORD fl)
 
   //  Allocate nonpageable memory for driver
   size = FileStdInfo.EndOfFile.u.LowPart;
-  buffer = ExAllocatePool(NonPagedPool, size);
+  buffer = ExAllocatePoolWithTag(NonPagedPool, size, TAG_GDITEXT);
 
   if (buffer == NULL)
   {
@@ -197,7 +198,7 @@ IntGdiAddFontResource(PUNICODE_STRING Filename, DWORD fl)
     return 0;
   }
   
-  entry = ExAllocatePool(NonPagedPool, sizeof(FONT_ENTRY));
+  entry = ExAllocatePoolWithTag(NonPagedPool, sizeof(FONT_ENTRY), TAG_FONT);
   if(!entry)
   {
     SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
@@ -284,7 +285,7 @@ BOOL FASTCALL InitFontSupport(VOID)
                 pBuff = ExAllocatePool(NonPagedPool,0x4000);
                 RtlInitUnicodeString(&cchFilename,0);
                 cchFilename.MaximumLength = 0x1000;
-                cchFilename.Buffer = ExAllocatePool(PagedPool,cchFilename.MaximumLength);
+                cchFilename.Buffer = ExAllocatePoolWithTag(PagedPool,cchFilename.MaximumLength, TAG_STRING);
  
                 cchFilename.Length = 0;
                                    
@@ -382,7 +383,7 @@ NtGdiAddFontResource(PUNICODE_STRING Filename, DWORD fl)
   }
   
   src = SafeFileName.Buffer;
-  SafeFileName.Buffer = (PWSTR)ExAllocatePool(PagedPool, SafeFileName.MaximumLength);
+  SafeFileName.Buffer = (PWSTR)ExAllocatePoolWithTag(PagedPool, SafeFileName.MaximumLength, TAG_STRING);
   if(!SafeFileName.Buffer)
   {
     SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
@@ -916,7 +917,7 @@ NtGdiGetCharWidth32(HDC  hDC,
    }
 
    BufferSize = (LastChar - FirstChar) * sizeof(INT);
-   SafeBuffer = ExAllocatePool(PagedPool, BufferSize);
+   SafeBuffer = ExAllocatePoolWithTag(PagedPool, BufferSize, TAG_GDITEXT);
    if (SafeBuffer == NULL)
    {
       SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
@@ -1219,7 +1220,7 @@ NtGdiGetTextExtentExPoint(HDC hDC,
       return TRUE;
     }
 
-  String = ExAllocatePool(PagedPool, Count * sizeof(WCHAR));
+  String = ExAllocatePoolWithTag(PagedPool, Count * sizeof(WCHAR), TAG_GDITEXT);
   if (NULL == String)
     {
       SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
@@ -1228,7 +1229,7 @@ NtGdiGetTextExtentExPoint(HDC hDC,
 
   if (NULL != UnsafeDx)
     {
-      Dx = ExAllocatePool(PagedPool, Count * sizeof(INT));
+      Dx = ExAllocatePoolWithTag(PagedPool, Count * sizeof(INT), TAG_GDITEXT);
       if (NULL == Dx)
        {
          ExFreePool(String);