From a73f47bd18af2d4a7a2b3fa12b6c7342ae014e83 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Sat, 2 Oct 2004 16:48:12 +0000 Subject: [PATCH] Allocate memory for the handle table from paged pool! svn path=/trunk/; revision=11158 --- reactos/subsys/win32k/objects/gdiobj.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/reactos/subsys/win32k/objects/gdiobj.c b/reactos/subsys/win32k/objects/gdiobj.c index 0830598123e..149680d6460 100644 --- a/reactos/subsys/win32k/objects/gdiobj.c +++ b/reactos/subsys/win32k/objects/gdiobj.c @@ -19,7 +19,7 @@ /* * GDIOBJ.C - GDI object manipulation routines * - * $Id: gdiobj.c,v 1.72 2004/09/29 03:36:52 arty Exp $ + * $Id: gdiobj.c,v 1.73 2004/10/02 16:48:12 navaraf Exp $ * */ #include @@ -194,10 +194,8 @@ GDIOBJ_iAllocHandleTable (WORD Size) MemSize = sizeof(GDI_HANDLE_TABLE) + sizeof(PGDIOBJ) * Size; - /* prevent APC delivery for the *FastMutexUnsafe calls */ - const KIRQL PrevIrql = KfRaiseIrql(APC_LEVEL); - ExAcquireFastMutexUnsafe (&HandleTableMutex); - handleTable = ExAllocatePoolWithTag(NonPagedPool, MemSize, TAG_GDIHNDTBLE); + ExAcquireFastMutex(&HandleTableMutex); + handleTable = ExAllocatePoolWithTag(PagedPool, MemSize, TAG_GDIHNDTBLE); ASSERT( handleTable ); memset (handleTable, 0, MemSize); #if GDI_COUNT_OBJECTS @@ -205,14 +203,13 @@ GDIOBJ_iAllocHandleTable (WORD Size) #endif handleTable->wTableSize = Size; handleTable->AllocationHint = 1; - handleTable->LookasideLists = ExAllocatePoolWithTag(NonPagedPool, + handleTable->LookasideLists = ExAllocatePoolWithTag(PagedPool, OBJTYPE_COUNT * sizeof(PAGED_LOOKASIDE_LIST), TAG_GDIHNDTBLE); if (NULL == handleTable->LookasideLists) { ExFreePool(handleTable); - ExReleaseFastMutexUnsafe (&HandleTableMutex); - KfLowerIrql(PrevIrql); + ExReleaseFastMutex(&HandleTableMutex); return NULL; } for (ObjType = 0; ObjType < OBJTYPE_COUNT; ObjType++) @@ -220,8 +217,7 @@ GDIOBJ_iAllocHandleTable (WORD Size) ExInitializePagedLookasideList(handleTable->LookasideLists + ObjType, NULL, NULL, 0, ObjSizes[ObjType].Size + sizeof(GDIOBJHDR), TAG_GDIOBJ, 0); } - ExReleaseFastMutexUnsafe (&HandleTableMutex); - KfLowerIrql(PrevIrql); + ExReleaseFastMutex(&HandleTableMutex); return handleTable; }