Author: cgutman
Date: Tue Nov 29 19:08:19 2011
New Revision: 54541
URL:
http://svn.reactos.org/svn/reactos?rev=54541&view=rev
Log:
[NTOSKRNL]
- Call MmReleasePageMemoryConsumer with the consumer that was actually allocated (not
always MC_CACHE)
Modified:
trunk/reactos/ntoskrnl/cache/section/reqtools.c
Modified: trunk/reactos/ntoskrnl/cache/section/reqtools.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/req…
==============================================================================
--- trunk/reactos/ntoskrnl/cache/section/reqtools.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/section/reqtools.c [iso-8859-1] Tue Nov 29 19:08:19 2011
@@ -69,7 +69,7 @@
{
while (i > 0)
{
- MmReleasePageMemoryConsumer(MC_CACHE, Required->Page[i-1]);
+ MmReleasePageMemoryConsumer(Required->Consumer, Required->Page[i-1]);
i--;
}
return Status;
@@ -127,7 +127,7 @@
{
DPRINT1("STATUS_NO_MEMORY: %x\n", Status);
MmUnlockAddressSpace(MmGetKernelAddressSpace());
- MmReleasePageMemoryConsumer(MC_CACHE, *Page);
+ MmReleasePageMemoryConsumer(RequiredResources->Consumer, *Page);
return STATUS_NO_MEMORY;
}
@@ -136,7 +136,7 @@
{
MmFreeMemoryArea(MmGetKernelAddressSpace(), TmpArea, NULL, NULL);
MmUnlockAddressSpace(MmGetKernelAddressSpace());
- MmReleasePageMemoryConsumer(MC_CACHE, *Page);
+ MmReleasePageMemoryConsumer(RequiredResources->Consumer, *Page);
DPRINT1("Status: %x\n", Status);
return Status;
}
@@ -161,7 +161,7 @@
if (!NT_SUCCESS(Status))
{
- MmReleasePageMemoryConsumer(MC_CACHE, *Page);
+ MmReleasePageMemoryConsumer(RequiredResources->Consumer, *Page);
DPRINT("Status: %x\n", Status);
return Status;
}