Author: jgardou Date: Sun Oct 30 18:37:30 2011 New Revision: 54277
URL: http://svn.reactos.org/svn/reactos?rev=54277&view=rev Log: [WIN32K] - Allocate lokkaside lists from non paged pool. - Add allocation failure check.
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c [iso-8859-1] Sun Oct 30 18:37:30 2011 @@ -27,7 +27,7 @@ #include <win32k.h> DBG_DEFAULT_CHANNEL(UserIcon);
-static PAGED_LOOKASIDE_LIST gProcessLookasideList; +static PPAGED_LOOKASIDE_LIST pgProcessLookasideList; static LIST_ENTRY gCurIconList;
SYSTEM_CURSORINFO gSysCursorInfo; @@ -35,7 +35,11 @@ BOOL InitCursorImpl() { - ExInitializePagedLookasideList(&gProcessLookasideList, + pgProcessLookasideList = ExAllocatePool(NonPagedPool, sizeof(PAGED_LOOKASIDE_LIST)); + if(!pgProcessLookasideList) + return FALSE; + + ExInitializePagedLookasideList(pgProcessLookasideList, NULL, NULL, 0, @@ -154,7 +158,7 @@ }
/* Not registered yet */ - Current = ExAllocateFromPagedLookasideList(&gProcessLookasideList); + Current = ExAllocateFromPagedLookasideList(pgProcessLookasideList); if (NULL == Current) { return FALSE; @@ -266,7 +270,7 @@ } }
- ExFreeToPagedLookasideList(&gProcessLookasideList, Current); + ExFreeToPagedLookasideList(pgProcessLookasideList, Current);
/* If there are still processes referencing this object we can't destroy it yet */ if (! IsListEmpty(&CurIcon->ProcessList))
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] Sun Oct 30 18:37:30 2011 @@ -13,7 +13,7 @@
/* GLOBALS *******************************************************************/
-static PAGED_LOOKASIDE_LIST MessageLookasideList; +static PPAGED_LOOKASIDE_LIST pgMessageLookasideList; PUSER_MESSAGE_QUEUE gpqCursor;
/* FUNCTIONS *****************************************************************/ @@ -23,7 +23,10 @@ NTAPI MsqInitializeImpl(VOID) { - ExInitializePagedLookasideList(&MessageLookasideList, + pgMessageLookasideList = ExAllocatePoolWithTag(NonPagedPool, sizeof(PAGED_LOOKASIDE_LIST), TAG_USRMSG); + if(!pgMessageLookasideList) + return STATUS_NO_MEMORY; + ExInitializePagedLookasideList(pgMessageLookasideList, NULL, NULL, 0, @@ -640,7 +643,7 @@ { PUSER_MESSAGE Message;
- Message = ExAllocateFromPagedLookasideList(&MessageLookasideList); + Message = ExAllocateFromPagedLookasideList(pgMessageLookasideList); if (!Message) { return NULL; @@ -654,7 +657,7 @@ VOID FASTCALL MsqDestroyMessage(PUSER_MESSAGE Message) { - ExFreeToPagedLookasideList(&MessageLookasideList, Message); + ExFreeToPagedLookasideList(pgMessageLookasideList, Message); }
BOOLEAN FASTCALL
Modified: trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] Sun Oct 30 18:37:30 2011 @@ -207,6 +207,8 @@ gpaLookasideList = ExAllocatePoolWithTag(NonPagedPool, GDIObjTypeTotal * sizeof(PAGED_LOOKASIDE_LIST), TAG_GDIHNDTBLE); + if(!gpaLookasideList) + return STATUS_NO_MEMORY;
InitLookasideList(GDIObjType_DC_TYPE, sizeof(DC)); InitLookasideList(GDIObjType_RGN_TYPE, sizeof(REGION));