mirror of
https://github.com/reactos/reactos.git
synced 2024-10-01 23:14:53 +00:00
remove eol whitespace
svn path=/trunk/; revision=13359
This commit is contained in:
parent
48bc6a5e53
commit
1291972098
|
@ -1,4 +1,4 @@
|
||||||
/* $Id:$
|
/* $Id$
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -60,13 +60,13 @@ static PMEMORY_AREA MmIterateNextNode(PMEMORY_AREA Node)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PMEMORY_AREA TempNode = NULL;
|
PMEMORY_AREA TempNode = NULL;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
/* Check if we're at the end of tree. */
|
/* Check if we're at the end of tree. */
|
||||||
if (Node->Parent == NULL)
|
if (Node->Parent == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
TempNode = Node;
|
TempNode = Node;
|
||||||
Node = Node->Parent;
|
Node = Node->Parent;
|
||||||
}
|
}
|
||||||
|
@ -113,13 +113,13 @@ static PMEMORY_AREA MmIteratePrevNode(PMEMORY_AREA Node)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PMEMORY_AREA TempNode = NULL;
|
PMEMORY_AREA TempNode = NULL;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
/* Check if we're at the end of tree. */
|
/* Check if we're at the end of tree. */
|
||||||
if (Node->Parent == NULL)
|
if (Node->Parent == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
TempNode = Node;
|
TempNode = Node;
|
||||||
Node = Node->Parent;
|
Node = Node->Parent;
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@ static VOID MmVerifyMemoryAreas(PMADDRESS_SPACE AddressSpace)
|
||||||
PMEMORY_AREA Node;
|
PMEMORY_AREA Node;
|
||||||
|
|
||||||
ASSERT(AddressSpace != NULL);
|
ASSERT(AddressSpace != NULL);
|
||||||
|
|
||||||
/* Special case for empty tree. */
|
/* Special case for empty tree. */
|
||||||
if (AddressSpace->MemoryAreaRoot == NULL)
|
if (AddressSpace->MemoryAreaRoot == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -152,7 +152,7 @@ static VOID MmVerifyMemoryAreas(PMADDRESS_SPACE AddressSpace)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define MmVerifyMemoryAreas(x)
|
#define MmVerifyMemoryAreas(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VOID STDCALL
|
VOID STDCALL
|
||||||
|
@ -161,7 +161,7 @@ MmDumpMemoryAreas(PMADDRESS_SPACE AddressSpace)
|
||||||
PMEMORY_AREA Node;
|
PMEMORY_AREA Node;
|
||||||
|
|
||||||
DbgPrint("MmDumpMemoryAreas()\n");
|
DbgPrint("MmDumpMemoryAreas()\n");
|
||||||
|
|
||||||
/* Special case for empty tree. */
|
/* Special case for empty tree. */
|
||||||
if (AddressSpace->MemoryAreaRoot == NULL)
|
if (AddressSpace->MemoryAreaRoot == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -268,13 +268,13 @@ MmLocateMemoryAreaByRegion(
|
||||||
* @name MmCompressHelper
|
* @name MmCompressHelper
|
||||||
*
|
*
|
||||||
* This is helper of MmRebalanceTree. Performs a compression transformation
|
* This is helper of MmRebalanceTree. Performs a compression transformation
|
||||||
* count times, starting at root.
|
* count times, starting at root.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static VOID
|
static VOID
|
||||||
MmCompressHelper(
|
MmCompressHelper(
|
||||||
PMADDRESS_SPACE AddressSpace,
|
PMADDRESS_SPACE AddressSpace,
|
||||||
ULONG Count)
|
ULONG Count)
|
||||||
{
|
{
|
||||||
PMEMORY_AREA Root = NULL;
|
PMEMORY_AREA Root = NULL;
|
||||||
PMEMORY_AREA Red = AddressSpace->MemoryAreaRoot;
|
PMEMORY_AREA Red = AddressSpace->MemoryAreaRoot;
|
||||||
|
@ -328,13 +328,13 @@ MmRebalanceTree(
|
||||||
CurrentNode = AddressSpace->MemoryAreaRoot;
|
CurrentNode = AddressSpace->MemoryAreaRoot;
|
||||||
while (CurrentNode != NULL)
|
while (CurrentNode != NULL)
|
||||||
{
|
{
|
||||||
if (CurrentNode->RightChild == NULL)
|
if (CurrentNode->RightChild == NULL)
|
||||||
{
|
{
|
||||||
PreviousNode = CurrentNode;
|
PreviousNode = CurrentNode;
|
||||||
CurrentNode = CurrentNode->LeftChild;
|
CurrentNode = CurrentNode->LeftChild;
|
||||||
NodeCount++;
|
NodeCount++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TempNode = CurrentNode->RightChild;
|
TempNode = CurrentNode->RightChild;
|
||||||
|
|
||||||
|
@ -358,7 +358,7 @@ MmRebalanceTree(
|
||||||
/* Transform Vine back into a balanced tree. */
|
/* Transform Vine back into a balanced tree. */
|
||||||
|
|
||||||
Leaves = NodeCount + 1;
|
Leaves = NodeCount + 1;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
ULONG Next = Leaves & (Leaves - 1);
|
ULONG Next = Leaves & (Leaves - 1);
|
||||||
if (Next == 0)
|
if (Next == 0)
|
||||||
|
@ -371,7 +371,7 @@ MmRebalanceTree(
|
||||||
|
|
||||||
Vine = NodeCount - Leaves;
|
Vine = NodeCount - Leaves;
|
||||||
Height = 1 + (Leaves > 0);
|
Height = 1 + (Leaves > 0);
|
||||||
while (Vine > 1)
|
while (Vine > 1)
|
||||||
{
|
{
|
||||||
MmCompressHelper(AddressSpace, Vine / 2);
|
MmCompressHelper(AddressSpace, Vine / 2);
|
||||||
Vine /= 2;
|
Vine /= 2;
|
||||||
|
@ -407,14 +407,14 @@ MmInsertMemoryArea(
|
||||||
ASSERT(marea->EndingAddress <= Node->StartingAddress ||
|
ASSERT(marea->EndingAddress <= Node->StartingAddress ||
|
||||||
marea->StartingAddress >= Node->EndingAddress);
|
marea->StartingAddress >= Node->EndingAddress);
|
||||||
ASSERT(marea->StartingAddress != Node->StartingAddress);
|
ASSERT(marea->StartingAddress != Node->StartingAddress);
|
||||||
|
|
||||||
PreviousNode = Node;
|
PreviousNode = Node;
|
||||||
|
|
||||||
if (marea->StartingAddress < Node->StartingAddress)
|
if (marea->StartingAddress < Node->StartingAddress)
|
||||||
Node = Node->LeftChild;
|
Node = Node->LeftChild;
|
||||||
else
|
else
|
||||||
Node = Node->RightChild;
|
Node = Node->RightChild;
|
||||||
|
|
||||||
if (Node)
|
if (Node)
|
||||||
{
|
{
|
||||||
Depth++;
|
Depth++;
|
||||||
|
@ -569,7 +569,7 @@ MmFindGapTopDown(
|
||||||
/* Check for overflow. */
|
/* Check for overflow. */
|
||||||
if (AlignedAddress > PreviousNode->StartingAddress)
|
if (AlignedAddress > PreviousNode->StartingAddress)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (Node->EndingAddress <= AlignedAddress)
|
if (Node->EndingAddress <= AlignedAddress)
|
||||||
{
|
{
|
||||||
DPRINT("MmFindGapTopDown: %p\n", AlignedAddress);
|
DPRINT("MmFindGapTopDown: %p\n", AlignedAddress);
|
||||||
|
@ -689,7 +689,7 @@ MmInitMemoryAreas(VOID)
|
||||||
*
|
*
|
||||||
* Free an existing memory area.
|
* Free an existing memory area.
|
||||||
*
|
*
|
||||||
* @param AddressSpace
|
* @param AddressSpace
|
||||||
* Address space to free the area from.
|
* Address space to free the area from.
|
||||||
* @param MemoryArea
|
* @param MemoryArea
|
||||||
* Memory area we're about to free.
|
* Memory area we're about to free.
|
||||||
|
@ -721,7 +721,7 @@ MmFreeMemoryArea(
|
||||||
KeAttachProcess(&AddressSpace->Process->Pcb);
|
KeAttachProcess(&AddressSpace->Process->Pcb);
|
||||||
}
|
}
|
||||||
|
|
||||||
EndAddress = MM_ROUND_UP(MemoryArea->EndingAddress, PAGE_SIZE);
|
EndAddress = MM_ROUND_UP(MemoryArea->EndingAddress, PAGE_SIZE);
|
||||||
for (Address = (ULONG_PTR)MemoryArea->StartingAddress;
|
for (Address = (ULONG_PTR)MemoryArea->StartingAddress;
|
||||||
Address < (ULONG_PTR)EndAddress;
|
Address < (ULONG_PTR)EndAddress;
|
||||||
Address += PAGE_SIZE)
|
Address += PAGE_SIZE)
|
||||||
|
@ -758,7 +758,7 @@ MmFreeMemoryArea(
|
||||||
KeDetachProcess();
|
KeDetachProcess();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remove the tree item. */
|
/* Remove the tree item. */
|
||||||
{
|
{
|
||||||
if (MemoryArea->Parent != NULL)
|
if (MemoryArea->Parent != NULL)
|
||||||
{
|
{
|
||||||
|
@ -824,7 +824,7 @@ MmFreeMemoryArea(
|
||||||
*
|
*
|
||||||
* Free an existing memory area given a pointer inside it.
|
* Free an existing memory area given a pointer inside it.
|
||||||
*
|
*
|
||||||
* @param AddressSpace
|
* @param AddressSpace
|
||||||
* Address space to free the area from.
|
* Address space to free the area from.
|
||||||
* @param BaseAddress
|
* @param BaseAddress
|
||||||
* Address in the memory area we're about to free.
|
* Address in the memory area we're about to free.
|
||||||
|
@ -875,7 +875,7 @@ MmFreeMemoryAreaByPtr(
|
||||||
*
|
*
|
||||||
* Create a memory area.
|
* Create a memory area.
|
||||||
*
|
*
|
||||||
* @param AddressSpace
|
* @param AddressSpace
|
||||||
* Address space to create the area in.
|
* Address space to create the area in.
|
||||||
* @param Type
|
* @param Type
|
||||||
* Type of the memory area.
|
* Type of the memory area.
|
||||||
|
@ -1000,7 +1000,7 @@ MmReleaseMemoryAreaIfDecommitted(PEPROCESS Process,
|
||||||
PLIST_ENTRY Entry;
|
PLIST_ENTRY Entry;
|
||||||
PMM_REGION Region;
|
PMM_REGION Region;
|
||||||
BOOLEAN Reserved;
|
BOOLEAN Reserved;
|
||||||
|
|
||||||
MmVerifyMemoryAreas(AddressSpace);
|
MmVerifyMemoryAreas(AddressSpace);
|
||||||
|
|
||||||
MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, BaseAddress);
|
MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, BaseAddress);
|
||||||
|
|
Loading…
Reference in a new issue