From bf53c43ed84e5fe0fdf32fb964a54429300d57cb Mon Sep 17 00:00:00 2001 From: James Tabor Date: Thu, 20 Dec 2007 02:36:38 +0000 Subject: [PATCH] Add a test to see which is the naughty handle type abusing the system. Free = 0 Window = 225 Menu = 116 CursorIcon = 1695 Hook = 2 CallProc = 6 Accel = 3 Monitor = 1 svn path=/trunk/; revision=31349 --- .../subsystems/win32/win32k/ntuser/object.c | 42 ++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/reactos/subsystems/win32/win32k/ntuser/object.c b/reactos/subsystems/win32/win32k/ntuser/object.c index 0487cd22f17..cc4b6ebbae5 100644 --- a/reactos/subsystems/win32/win32k/ntuser/object.c +++ b/reactos/subsystems/win32/win32k/ntuser/object.c @@ -68,7 +68,47 @@ __inline static PUSER_HANDLE_ENTRY alloc_user_entry(PUSER_HANDLE_TABLE ht) if (ht->nb_handles >= ht->allocated_handles) /* need to grow the array */ { - DPRINT1("Out of user handles!\n"); +/**/ + int i, iFree = 0, iWindow = 0, iMenu = 0, iCursorIcon = 0, + iHook = 0, iCallProc = 0, iAccel = 0, iMonitor = 0; + /**/ + DPRINT1("Out of user handles! Used -> %i, NM_Handle -> %d\n", usedHandles, ht->nb_handles); +//#if 0 + for(i = 0; i < ht->nb_handles; i++) + { + switch (ht->handles[i].type) + { + case otFree: // Should be zero. + iFree++; + break; + case otWindow: + iWindow++; + break; + case otMenu: + iMenu++; + break; + case otCursorIcon: + iCursorIcon++; + break; + case otHook: + iHook++; + break; + case otCallProc: + iCallProc++; + break; + case otAccel: + iAccel++; + break; + case otMonitor: + iMonitor++; + break; + default: + break; + } + } + DPRINT1("Handle Count by Type:\n Free = %d Window = %d Menu = %d CursorIcon = %d Hook = %d\n CallProc = %d Accel = %d Monitor = %d\n", + iFree, iWindow, iMenu, iCursorIcon, iHook, iCallProc, iAccel, iMonitor ); +//#endif return NULL; #if 0 PUSER_HANDLE_ENTRY new_handles;