- Locked the pages in MmCommitPagedPoolAddress, if it is necessary.

svn path=/trunk/; revision=8199
This commit is contained in:
Hartmut Birr 2004-02-15 19:03:29 +00:00
parent f12e3bf622
commit 48632d6399
3 changed files with 10 additions and 6 deletions

View file

@ -479,7 +479,7 @@ NTSTATUS
MmCreateVirtualMappingForKernel(PVOID Address,
ULONG flProtect,
PHYSICAL_ADDRESS PhysicalAddress);
NTSTATUS MmCommitPagedPoolAddress(PVOID Address);
NTSTATUS MmCommitPagedPoolAddress(PVOID Address, BOOLEAN Locked);
NTSTATUS MmCreateVirtualMapping(struct _EPROCESS* Process,
PVOID Address,
ULONG flProtect,

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: mm.c,v 1.67 2003/12/30 18:52:05 fireball Exp $
/* $Id: mm.c,v 1.68 2004/02/15 19:03:29 hbirr Exp $
*
* COPYRIGHT: See COPYING in the top directory
* PROJECT: ReactOS kernel
@ -251,7 +251,7 @@ NTSTATUS MmAccessFault(KPROCESSOR_MODE Mode,
return(Status);
}
NTSTATUS MmCommitPagedPoolAddress(PVOID Address)
NTSTATUS MmCommitPagedPoolAddress(PVOID Address, BOOLEAN Locked)
{
NTSTATUS Status;
PHYSICAL_ADDRESS AllocatedPage;
@ -279,6 +279,10 @@ NTSTATUS MmCommitPagedPoolAddress(PVOID Address)
FALSE);
MmLockAddressSpace(MmGetKernelAddressSpace());
}
if (Locked)
{
MmLockPage(AllocatedPage);
}
return(Status);
}
@ -348,7 +352,7 @@ NTSTATUS MmNotPresentFault(KPROCESSOR_MODE Mode,
{
case MEMORY_AREA_PAGED_POOL:
{
Status = MmCommitPagedPoolAddress((PVOID)Address);
Status = MmCommitPagedPoolAddress((PVOID)Address, Locked);
break;
}

View file

@ -1,4 +1,4 @@
/* $Id: ppool.c,v 1.24 2003/12/30 18:52:05 fireball Exp $
/* $Id: ppool.c,v 1.25 2004/02/15 19:03:29 hbirr Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -80,7 +80,7 @@ MmInitializePagedPool(VOID)
* We are still at a high IRQL level at this point so explicitly commit
* the first page of the paged pool before writing the first block header.
*/
MmCommitPagedPoolAddress((PVOID)MmPagedPoolFirstFreeBlock);
MmCommitPagedPoolAddress((PVOID)MmPagedPoolFirstFreeBlock, FALSE);
MmPagedPoolFirstFreeBlock->Size = MmPagedPoolSize;
MmPagedPoolFirstFreeBlock->NextFree = NULL;