网站首页  词典首页

请输入您要查询的函数:

 

术语 mapuserphysicalpages
释义 MapUserPhysicalPages
语法:
C++
BOOL WINAPI MapUserPhysicalPages(
__in PVOID lpAddress,
__in ULONG_PTR NumberOfPages,
__in PULONG_PTR UserPfnArray
);
MapUserPhysicalPages功能
以前分配在地图中的一个地址窗口扩展指定地址的物理内存页(AWE)的地区。
要执行批量测绘和,多个地区取消映射使用MapUserPhysicalPagesScatter功能。
64位Itanium的Windows系统:由于在页面大小的差异,MapUserPhysicalPages不支持32位应用程序。
参数
lpAddress [in]
向本地区的内存起始地址指针映射。
在lpAddress值必须在地址范围的VirtualAlloc函数返回时,地址窗口扩展(AWE)的区域分配。
NumberOfPages [in]
的物理内存和虚拟地址空间而建立的网页翻译,大小。
虚拟地址范围是连续的lpAddress开始。物理帧指定的UserPfnArray。
的网页总数不能延长至超出了是在指定范围内的AllocateUserPhysicalPages年底开始地址。
UserPfnArray [in]
对一个物理页帧号码数组的指针。
这些帧映射参数lpAddress从这个函数的返回。由于制定了分配内存的大小应至少NumberOfPages倍的数据类型ULONG_PTR的大小。
不要试图修改此缓冲区。它包含操作系统数据,以及腐败将会是灾难性的。缓冲区中的信息是没有用的应用程序。
如果该参数为NULL,则指定的地址范围映射。此外,指定的物理页面没有释放,您必须调用FreeUserPhysicalPages释放他们。
返回值
如果函数成功,返回值为TRUE。
如果函数失败,返回值为FALSE,并没有映射完成,部分或以其他方式。为了获得更多错误信息,调用GetLastError。
备注
物理页面映射但他们不是被释放。您必须调用FreeUserPhysicalPages释放物理页。
任何物理内存页的数量可以指定,但内存不能扩展之外的虚拟地址空间VirtualAlloc分配。任何现有地址的地图会自动覆盖新的翻译,和老翻译的映射。
您不能映射外AllocateUserPhysicalPages是在指定范围内的物理内存页。您可以映射多个地区同时进行,但不能重叠。
物理页可以位于任何物理地址,但不要对毗连的物理页的假设。
当前要取消映射地址范围,指定为物理内存页数组参数为NULL。任何当前映射页面映射,但没有释放。您必须调用FreeUserPhysicalPages释放物理页。
在多处理器环境,这个功能的硬件转换缓冲区保持连贯性。在这个函数的返回,在所有的处理器保证所有的线程看到正确的映射。
要编译的应用程序使用此函数,定义为0x0500或更高_WIN32_WINNT宏。有关详细信息,请参阅使用Windows头。
实例
有关示例,请参阅awe例子。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
地址窗口扩展
AllocateUserPhysicalPages
FreeUserPhysicalPages
MapUserPhysicalPagesScatter
内存管理功能
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==MapUserPhysicalPages Function
Maps previously allocated physical memory pages at a specified address in an Address Windowing Extensions (AWE) region.
To perform batch mapping and unmapping of multiple regions, use the MapUserPhysicalPagesScatter function.
64-bit Windows on Itanium-based systems: Due to the difference in page sizes, MapUserPhysicalPages is not supported for 32-bit applications.
Syntax
C++
BOOL WINAPI MapUserPhysicalPages(
__in PVOID lpAddress,
__in ULONG_PTR NumberOfPages,
__in PULONG_PTR UserPfnArray
);
Parameters
lpAddress [in]
A pointer to the starting address of the region of memory to remap.
The value of lpAddress must be within the address range that the VirtualAlloc function returns when the Address Windowing Extensions (AWE) region is allocated.
NumberOfPages [in]
The size of the physical memory and virtual address space for which to establish translations, in pages.
The virtual address range is contiguous starting at lpAddress. The physical frames are specified by the UserPfnArray.
The total number of pages cannot extend from the starting address beyond the end of the range that is specified in AllocateUserPhysicalPages .
UserPfnArray [in]
A pointer to an array of physical page frame numbers.
These frames are mapped by the argument lpAddress on return from this function. The size of the memory that is allocated should be at least the NumberOfPages times the size of the data type ULONG_PTR.
Do not attempt to modify this buffer. It contains operating system data, and corruption could be catastrophic. The information in the buffer is not useful to an application.
If this parameter is NULL, the specified address range is unmapped. Also, the specified physical pages are not freed, and you must call FreeUserPhysicalPages to free them.
Return Value
If the function succeeds, the return value is TRUE.
If the function fails, the return value is FALSE and no mapping is done—partial or otherwise. To get extended error information, call GetLastError .
Remarks
The physical pages are unmapped but they are not freed. You must call FreeUserPhysicalPages to free the physical pages.
Any number of physical memory pages can be specified, but the memory must not extend outside the virtual address space that VirtualAlloc allocates. Any existing address maps are automatically overwritten with the new translations, and the old translations are unmapped.
You cannot map physical memory pages outside the range that is specified in AllocateUserPhysicalPages . You can map multiple regions simultaneously, but they cannot overlap.
Physical pages can be located at any physical address, but do not make assumptions about the contiguity of the physical pages.
To unmap the current address range, specify NULL as the physical memory page array parameter. Any currently mapped pages are unmapped, but are not freed. You must call FreeUserPhysicalPages to free the physical pages.
In a multiprocessor environment, this function maintains hardware translation buffer coherence. On return from this function, all threads on all processors are guaranteed to see the correct mapping.
To compile an application that uses this function, define the _WIN32_WINNT macro as 0x0500 or later. For more information, see Using the Windows Headers .
Examples
For an example, see AWE Example .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
Address Windowing Extensions
AllocateUserPhysicalPages
FreeUserPhysicalPages
MapUserPhysicalPagesScatter
Memory Management Functions
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa366753(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 9:20:24