分类:
2008-10-13 16:11:09
Address Windowing Extensions (AWE) is a set of extensions that allows an application to quickly manipulate physical memory greater than 4GB. Certain data-intensive applications, such as database management systems and scientific and engineering software, need access to very large caches of data. In the case of very large data sets, restricting the cache to fit within an application's 2GB of user address space is a severe restriction. In these situations, the cache is too small to properly support the application.
AWE solves this problem by allowing applications to directly address huge amounts of memory while continuing to use 32-bit pointers. AWE allows applications to have data caches larger than 4GB (where sufficient physical memory is present). AWE uses physical nonpaged memory and window views of various portions of this physical memory within a 32-bit virtual address space.
AWE places a few restrictions on how this memory may be used, primarily because these restrictions allow extremely fast mapping, remapping, and freeing. Fast memory management is important for these potentially enormous address spaces.
This solution addresses the physical memory issues in a very general, widely applicable manner. Some of the benefits of AWE are:
An application must have the Lock Pages in Memory privilege to use AWE. To obtain this privilege, an administrator must add Lock Pages in Memory to the user's User Rights Assignments. For more information on how to do this, see "User Rights" in the operating system help.
The following functions make up the Address Windowing Extensions (AWE) API.
Function | Description |
---|---|
Reserve a portion of virtual address space to use for AWE, using MEM_PHYSICAL. | |
Allocate physical memory for use with AWE. | |
Map (or invalidate) AWE virtual addresses onto any set of physical pages obtained with AllocateUserPhysicalPages. | |
Map (or invalidate) AWE virtual addresses onto any set of physical pages obtained with AllocateUserPhysicalPages, but with finer control than that provided by MapUserPhysicalPages. | |
Free physical memory that was used for AWE. |
就是先分配一块大物理内存(其实就有点像LINUX的HUGETLB一样),然后通过一个类似窗口的东东不停的映射。MSDN上说用在像数据库这种吃内存的地方可能会比较好。
就普通的服务器来说,我觉得也可以加快内存访问速度(当然不一定要超过4G内存啦),因为这是物理内存啊,可能还不会被swap.