[ros-diffs] [jimtabor] 31349: 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

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Thu Dec 20 03:36:38 CET 2007


Author: jimtabor
Date: Thu Dec 20 05:36:38 2007
New Revision: 31349

URL: http://svn.reactos.org/svn/reactos?rev=31349&view=rev
Log:
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

Modified:
    trunk/reactos/subsystems/win32/win32k/ntuser/object.c

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/object.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/object.c?rev=31349&r1=31348&r2=31349&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/object.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/object.c Thu Dec 20 05:36:38 2007
@@ -68,7 +68,47 @@
 
    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;




More information about the Ros-diffs mailing list