????? ????? ???? RAM ?? ????? ????? ???????

?????? ????????? ?????? ?????????
???? ???????: 189327 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

??? ????? ???? ????? ?? ??????? ???? ?? ???? ??????? ???????:
  • ??? ???? ???? PTEs (NO_MORE_SYSTEM_PTES).
  • ????? ????? ??????? ????????? ??? ?????.
???? ??? ???????:
  • ????? ???? ??? ????????
  • ????? ?????? ?????
  • ??????? ????? ????? ?????? ??? ????? ????? ???????

??????? ????

????? ??? ??????? ???? ?????? (PTE)

?? ????? ??? ??????? ??? ???? Windows NT ???? ????? ????? 4 ???? ???? ?????? ??? 0x00000000 0xFFFFFFFF ??????????. ????? ????? 2 ???????? ?????? ?????? 0x8000000 0xFFFFFFFF ??????? ???? ???????? ?????? ??????? ?? ?????? ???? ???? ???? ????? ????? kernel ?? ????. ??????? ??????? ?????? ??? 0x00000000 0x7FFFFFFF ???? ????? ??????? ????????.

?? ????? ????? ???? ?? ???? ?? ??????? ??????? conceptually ??? ???? ????? ???????. ??? ????????? ?? ??????? ???????? ????? (VMM) ????????? ?? ????? ???? ????? ??????? (MMU) ????? ?? ????? ?? ????? ????? ??? ????? ???? ???????. ???? VMM ??????? ?????? ????? ????? ?????? ???????? ??? ???? ??? ??? ???? ??????? ????? ????? ???? ?????? ??????? ??? ??? ?????? ??????? ?? ????? ?????. ?? PTE ???? ???? ???? ?????? ??? ????????? ???????? VMM ?????? ???? ????.

??? x 86-based ???? ?????? ??? ???? 4 ???????? ? ?? ???? ?????? ???? PTEs ???????? ?????? ? ???????? ?? ????? ??????? 524,288 (2 ???? ????/4 ????????). ??? ???? ??????? ??? ??????? ??? ??????? ??? ???:
  • ???? ???? ?? 50.000 PTEs (??????? 195 ????? ????????) ?????? ????????? ?????.
  • ??? ??????? ???????? ?? ????? ????? ??????? ?????? ????? ? ????? ????? ? ?????? ?????? ??? ????? ? ????? ??? ????? ??? ????? ????? ????? ?????? ????? ? ???.
??? ????? ??? ???? PTE ??? ???????? ??? ??? ????? ?????? ???????? ??? ????? ??????? ??????? ?? ??????. ??? ??? ??? ?????? ??? ?????? ?????? ??? ????? ? ????? ??? ????? ??? ????? ????? ????? ??? ?? ????? ??????? ??????? ?? ???? ?????.

?????? ?????? ??? PTEs ?????? ????? ???? ????? kernel ?? ????? ????? ????? ??????? (? DLLs ?????? ???) ? ?????? ????? ??????? ???????? ???? ??? I/O ?? ???????? ?? MmMapIoSpace/MmMapLockedPages/MmGetSystemAddressForMdl/MmAllocateNonCachedMemory ? ?????? ???? ??????. ???? ?? ???? ????????? ????? ??? ?????? ???? PTE ?? ????? ?????. ?? ???? ?????? ????? ????? ???? ???? ?? ?????? ????? ?? ?? ???? ?????? ??? ?????? ??? ????? ??????? ???????? ????????? ?? ?????? ???? PTE ?? ?? ??? ???? ??? ????? ?? ?? ????? ???????? ????? ?????? ??? ???.

???? ????? ??? ??? ??? ?????? ????? ?????? ????? ?????? ???? PTE ??????? ????? ???? ?? ?????? ???? ????? ? ??? ?????? ?? ?????? ??????? ???? ?? ??? ????? ?????? ???????? ?????? ? ????? ??????? ????? (???? ??? ????? ????? ??????? ????? - ????? ?????? ?? ????? ??????? MustSucceed).

??? ?? ???? ????? ?????? ??? ??????? ??? ?????? ???? ???. ??????? ????? ???? RAM ????? ???? ????? ?????? ?? ?? ???? ??????? ?????? ????? ???? ??????? ???. ??? ??????? ???? ???? ??????? ??? ?? ??? ?????? ????? ??? ?????? ??? ???? ?? ??? ??????.

???: ??????? ??????? ????? ?? ????? ?? ???? ??????? ??????. ????? ???? ????? ?????? ?? PTEs ?? ???? ???? ????? ????????. ????? ????? ????? ????????? ?? ???? PTEs ????? ??? ????? ?????? ???????? - ??? ???? ?????? ?????? ????? ??? (????? ??? ??????? ???? ?????) ??? ??????? ???:
   HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
   \Memory Management\SystemPages
				
???? ???? ????? ?????? ?????? ???????? "???? ??????? ???? ????? ??????" ???????? "?????? ??????".

??????: ?? ??? ????????? ?? ????? ??????? ???? ???????? ??????. ??? ??????? ?? ????? ??????? ??????? ??? ??? ???? ??????? ??????? ?? ????? ??????? ??????.

???? ??? ??????? ?????? ?????? ????? ????? ??????. ??????? ????? ?????? ??????? ?????? ??? ???????? ??????? - ??????? ?????? ??????? ??????? ??? ?????? ???????- ??????? ?????????? ??? ????? ????????. ????? ??? ????????? ??????? ??????? ?? ???????. ????? ???????? PTE ?? ?? ?? ????? ?? ????? ???? ????? ?? ??????? ?? ?????? ?????. ??? ???? ?? ????? ?? ????? ??? ????? ???????? ??? ?? ??? ????? ?? ???????.

????? ???? ??????

???? ????? (MAPMEM) ?? Windows NT 4.0 DDK (????? ?? ???? ????? Professional MSDN) ???? ???? ????? ????? ??? ???????. ????? ??? ???? ?????? ???????:

  1. ?????? ??? ??????? ?????? ???????? ????? ?????? (HalTranslateBusAddress).
  2. ??? ????? ???? (ZwOpenSection) \Device\PhysicalMemory ???? ??????? ???????.
  3. ???? ???? ???? (ObReferenceObjectByHandle) ???? ???.
  4. ????? ??????? (ZwMapViewOfSection).
??????? ??????? ?? ZwMapViewOfSection ?????? ??? ?? ?????? ????? ??????. ??? ??? ???? ?? ?????? ??? ??????? ?? ?????? ????? ??????? ????????? ??????? (DPC) ?? ?????? ????? ???? (ISR) ???? ???? ?? ???? ????? ??????? "? ??? ????? ????? ??????? ?? ????? ??????? ?????? (?????? ??????? ???????). ??????? (ZwUnMapViewOfSection) ??????? ?? ??? ???? ??????? ???? ??? ??????? ??? ?????.

??????: ?? ???, ???? ?? ???? ??????? ???????? ZwMapViewOfSection ???????? \Device\PhysicalMemory ??? ??? ??? ???? ?????? ??????? ???????. ?????? ????? ?????? ????? ?? ???? ?? ???? ?????? ??????? ??? ??????? ???? ???? ?????? ????? ???? ???? ????? ??????? ?? ????? ??????? ????. ??? ????? ?????? ????? ??????? ???? ???? ?????. ?????? ??? ?????? ????? ?????? ????? ???? concurrently ?? ????? ?????? (??? ??????? ?????? writecombined ?? noncached ??). ???? ??? ??????? ??? TLB ??????? "?" ????? ??? ??????.

??? WindowsXP ? ???? ?????? ZwMapViewOfSection ??? STATUS_CONFLICTING_ADDRESSES ????? ??????? ?????? ????? ??? ????? ???? concurrently ?? ???? ???????.

????? MmMapIoSpace

???? ??? ??????? ????? ????? ????? ?? ????? ????? ??????? ?????? ??? ????? ??????? ???????? ???????.
  1. ?????? ??? ??????? ?????? ???????? ????? ?????? (HalTranslateBusAddress).
  2. ????? ??????? ?? ????? ??????? ?????? ??? ?????? ??? ????? ??? ???:
          SystemVirtualAddress = MmMapIoSpace(PhysicalAddress, SizeofMemory,
             CacheEnable);
    					
  3. ????? Mdl:
          Mdl = IoAllocateMdl(SystemVirtualAddress, SizeOfMemory, FALSE, FALSE,
             NULL);
  4. ????? MDL ???? ????? ???????:
          MmBuildMdlForNonPagedPool(Mdl);
  5. ????? ??????? ?? ??????? ????? ???????? ????? ???????? MmMapLockedPages. ???? ???? ??? ????? ?? ?????? ??????? ?????? ??? ??? ??? ????? SP4 ? SP4 ??? ????????? ?? Windows NT ??????? ??????? ??????? ???? ??? ??? ?????? ?? ???? ??????? Windows NT:
          UserVirtualAddress = (PVOID)(((ULONG)PAGE_ALIGN(MmMapLockedPages(Mdl,
             Mode))) + MmGetMdlByteOffset(Mdl));
    					
?????? ??? ??????? ??????? ???? ??? ??? ??????? ????? ?????? ?? "????? ??????? ?? Microsoft:
199311INFO: MmMapLockedPages ????? ??????? ??????? ?????? ?? SP4
?????? ?? ??? ??????? ?? ?????? ??? SystemVirtualAddress ????? ???? ????????? ?? ?? ???? ??????? (??? DPCs ISR) ? UserVirtualAddress ???? ???? ????????? ?? ??? ????? ??? ???????? ?? ?????? ????? ?? ??????.

?? ???? ????? ?? ????? ??????? ?????? ???? ??? ??????? ??? ???:
MmUnmapIoSpace(SystemVirtualAddress, SizeofMemory);
				
??? ????? ?? ????? ??????? ???????? ???? ??? ??????? ??? ??? ??? ????? ??????? ?? ???? ??????? ???? ??? ??????? ???????:
MmUnmapLockedPages(UserVirtualAddress, Mdl); 

Finally, free the MDL by calling:

IoFreeMdl(Mdl);
				

?????

????? ?? ?????????? ???? ????? Windows NT 4.0 DDK ?? "???? Windows NT" ?????? Helen Custer (Microsoft Press ????).

???????

???? ???????: 189327 - ????? ??? ??????: 26/????/1426 - ??????: 1.2
????? ???
  • Microsoft Win32 Device Driver Kit ?? Windows NT 4.0
????? ??????: 
kbmt kbhowto kbkmode KB189327 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????189327
????? ??????? ?? ????? ???? ?? ????? ???????
?? ????? ????? ?????? ???? ???? ???? ??? ??????? ??? ?? ? ?? ??? ??????? Microsoft ??? ????? ??? ??????? ????? ?????? ?????

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com