Author: gadamopoulos Date: Thu May 12 08:00:11 2011 New Revision: 51682
URL: http://svn.reactos.org/svn/reactos?rev=51682&view=rev Log: [win32k] - Implement counting user objects per process
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/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/object.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/object.c [iso-8859-1] Thu May 12 08:00:11 2011 @@ -54,7 +54,7 @@ __inline static PUSER_HANDLE_ENTRY alloc_user_entry(PUSER_HANDLE_TABLE ht) { PUSER_HANDLE_ENTRY entry; - + PPROCESSINFO ppi = PsGetCurrentProcessWin32Process(); DPRINT("handles used %i\n",gpsi->cHandleEntries);
if (ht->freelist) @@ -63,6 +63,7 @@ ht->freelist = entry->ptr;
gpsi->cHandleEntries++; + ppi->UserHandleCount++; return entry; }
@@ -132,6 +133,7 @@ entry->generation = 1;
gpsi->cHandleEntries++; + ppi->UserHandleCount++;
return entry; } @@ -147,6 +149,7 @@
__inline static void *free_user_entry(PUSER_HANDLE_TABLE ht, PUSER_HANDLE_ENTRY entry) { + PPROCESSINFO ppi = PsGetCurrentProcessWin32Process(); void *ret; ret = entry->ptr; entry->ptr = ht->freelist; @@ -156,6 +159,7 @@ ht->freelist = entry;
gpsi->cHandleEntries--; + ppi->UserHandleCount--;
return ret; }