Commit in reactos/subsys/win32k/ntuser on MAIN
menu.c+7-51.44 -> 1.45
added pool tags for better debugging

reactos/subsys/win32k/ntuser
menu.c 1.44 -> 1.45
diff -u -r1.44 -r1.45
--- menu.c	15 Feb 2004 07:39:12 -0000	1.44
+++ menu.c	19 Feb 2004 19:44:39 -0000	1.45
@@ -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.44 2004/02/15 07:39:12 gvg Exp $
+/* $Id: menu.c,v 1.45 2004/02/19 19:44:39 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -43,6 +43,8 @@
 #define NDEBUG
 #include <debug.h>
 
+#define TAG_MENU TAG('M', 'E', 'N', 'U')
+
 /* INTERNAL ******************************************************************/
 
 /* maximum number of menu items a menu can contain */
@@ -325,7 +327,7 @@
     Old = NewMenuItem;
     if(NewMenuItem)
       NewMenuItem->Next = MenuItem;
-    NewMenuItem = ExAllocatePool(PagedPool, sizeof(MENU_ITEM));
+    NewMenuItem = ExAllocatePoolWithTag(PagedPool, sizeof(MENU_ITEM), TAG_MENU);
     if(!NewMenuItem)
       break;
     NewMenuItem->fType = MenuItem->fType;
@@ -341,7 +343,7 @@
       {
         NewMenuItem->Text.Length = 0;
         NewMenuItem->Text.MaximumLength = MenuItem->Text.MaximumLength;
-        NewMenuItem->Text.Buffer = (PWSTR)ExAllocatePool(PagedPool, MenuItem->Text.MaximumLength);
+        NewMenuItem->Text.Buffer = (PWSTR)ExAllocatePoolWithTag(PagedPool, MenuItem->Text.MaximumLength, TAG_MENU);
         if(!NewMenuItem->Text.Buffer)
         {
           ExFreePool(NewMenuItem);
@@ -746,7 +748,7 @@
       Source = (PUNICODE_STRING)lpmii->dwTypeData;
       FreeMenuText(MenuItem);
       copylen = min((UINT)Source->MaximumLength, (lpmii->cch + 1) * sizeof(WCHAR));
-      MenuItem->Text.Buffer = (PWSTR)ExAllocatePool(PagedPool, copylen);
+      MenuItem->Text.Buffer = (PWSTR)ExAllocatePoolWithTag(PagedPool, copylen, TAG_MENU);
       if(MenuItem->Text.Buffer)
       {
         MenuItem->Text.Length = 0;
@@ -810,7 +812,7 @@
       pos = -1;
     }
   
-  MenuItem = ExAllocatePool(PagedPool, sizeof(MENU_ITEM));
+  MenuItem = ExAllocatePoolWithTag(PagedPool, sizeof(MENU_ITEM), TAG_MENU);
   if (NULL == MenuItem)
     {
       SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
CVSspam 0.2.8