mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 01:24:38 +00:00
added pool tags for better debugging
svn path=/trunk/; revision=8266
This commit is contained in:
parent
e4340278d7
commit
4e2ccf1842
1 changed files with 7 additions and 5 deletions
|
@ -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 @@ IntCloneMenuItems(PMENU_OBJECT Destination, PMENU_OBJECT Source)
|
|||
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 @@ IntCloneMenuItems(PMENU_OBJECT Destination, PMENU_OBJECT Source)
|
|||
{
|
||||
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 @@ 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)ExAllocatePool(PagedPool, copylen);
|
||||
MenuItem->Text.Buffer = (PWSTR)ExAllocatePoolWithTag(PagedPool, copylen, TAG_MENU);
|
||||
if(MenuItem->Text.Buffer)
|
||||
{
|
||||
MenuItem->Text.Length = 0;
|
||||
|
@ -810,7 +812,7 @@ IntInsertMenuItem(PMENU_OBJECT MenuObject, UINT uItem, BOOL fByPosition,
|
|||
pos = -1;
|
||||
}
|
||||
|
||||
MenuItem = ExAllocatePool(PagedPool, sizeof(MENU_ITEM));
|
||||
MenuItem = ExAllocatePoolWithTag(PagedPool, sizeof(MENU_ITEM), TAG_MENU);
|
||||
if (NULL == MenuItem)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
|
|
Loading…
Reference in a new issue