The following points may be a bit different from the actual situation, because I have not read Microsoft's internal documents and cannot find other materials.
It can only be inferred based on the existing information that a person or ox can give directions. Point out the problems. Please click it.
Common memory allocation method:
The left side of the figure shows the normal memory allocation method.
When the virtual memory in the program is submitted, the program will apply for memory from the system, the system will allocate a PFN, a pfn contains a lot of information, mainly representing the memory page, sometimes it can be viewed as a memory page, which is easier to understand.
If Pte is from VAS, that is, virtual memory, when committed to physical memory, PTE records ing information.
The basic process of normal allocation may be as follows. After applying for PFN, the PTE maps to the corresponding PFN, and reads the pages in Vas to the physical memory page corresponding to PFN.
This feeling is relatively simple
Awe memory allocation:
Those who have a deep understanding of SQL Server will know that after SQL server enables awe, the allocated memory will be locked, that is, the locked page, it cannot be released before the program is stopped.
When the program wants the system to request memory in awe mode, the system will apply for a memory from the PFN database, that is, a place for PFN management, and map the physical memory corresponding to the PFN to the virtual memory.
That is, the virtual memory points to the physical memory through a pointer. See the figure below:
When the PFN is mapped to the virtual memory, the PTE will be allocated and bound to the PFN to apply a lock. However, the PFN memory has been mapped to the virtual memory, and the PFN will point to the memory pointer to the Pte.
Therefore, PTE cannot detect how much memory is allocated to the program by awe. Therefore, it is impossible to swap out pages for the memory allocated by awe, resulting in locked page.