能力值:
( LV7,RANK:110 )
|
-
-
2 楼
ReatOs中的源代码
PMEMORY_AREA NTAPI
MmLocateMemoryAreaByRegion(
PMMSUPPORT AddressSpace,
PVOID Address,
ULONG_PTR Length)
{
PMEMORY_AREA Node;
PVOID Extent = (PVOID)((ULONG_PTR)Address + Length);
/* Special case for empty tree. */
if (AddressSpace->WorkingSetExpansionLinks.Flink == NULL)
return NULL;
/* Traverse the tree from left to right. */
for (Node = MmIterateFirstNode((PMEMORY_AREA)AddressSpace->WorkingSetExpansionLinks.Flink);
Node != NULL;
Node = MmIterateNextNode(Node))
{
if (Node->StartingAddress >= Address &&
Node->StartingAddress < Extent)
{
DPRINT("MmLocateMemoryAreaByRegion(%p - %p): %p - %p\n",
Address, (ULONG_PTR)Address + Length, Node->StartingAddress,
Node->EndingAddress);
return Node;
}
if (Node->EndingAddress > Address &&
Node->EndingAddress < Extent)
{
DPRINT("MmLocateMemoryAreaByRegion(%p - %p): %p - %p\n",
Address, (ULONG_PTR)Address + Length, Node->StartingAddress,
Node->EndingAddress);
return Node;
}
if (Node->StartingAddress <= Address &&
Node->EndingAddress >= Extent)
{
DPRINT("MmLocateMemoryAreaByRegion(%p - %p): %p - %p\n",
Address, (ULONG_PTR)Address + Length, Node->StartingAddress,
Node->EndingAddress);
return Node;
}
if (Node->StartingAddress >= Extent)
{
DPRINT("Finished MmLocateMemoryAreaByRegion() = NULL\n");
return NULL;
}
}
return NULL;
}
|
能力值:
( LV2,RANK:10 )
|
-
-
3 楼
可以给一个联系方式吗
|
能力值:
( LV7,RANK:110 )
|
-
-
4 楼
|
能力值:
( LV2,RANK:10 )
|
-
-
5 楼
|
能力值:
( LV2,RANK:10 )
|
-
-
6 楼
谢了.....
|
|
|