阅读:1225回复:3
Win 2000 Device Drivers Tutorial 5
MDLs
One of the common problems in interfacing an application to a device driver is the management of memory. Drivers may require access to selected parts of application memory, and by its very nature, a Driver will want that memory range not to be pageable while kernel-mode access is being made. The Driver may require contiguous access to memory that\'s not linearly contiguous in application space, or it may even require memory to be physically contiguous. Windows includes a generalized model to represent portions of addressable memory to a Driver. This is done by creating objects called Memory Descriptors, where a memory descriptor represents one contiguous chunk of linear memory. Windows groups one or more of those Memory Descriptors as another object known as a Memory Descriptor List, or MDL for short. An MDL describes a set of memory buffers, not necessarily contiguous. The I/O Manager is able to make the memory in an MDL to look linearly contiguous, for example, so that the Driver can move a buffer of data to or from application space without having to worry about whether the data is contiguous. The I/O Manager can also lock the application memory pages in virtual storage, making them unpageable for the duration of the Driver\'s work. We will see that while buffered I/O does not require an MDL, we do need MDLs if we want to perform Direct I/O or \"Neither\" I/O. These techniques of performing input and output are presented to the Driver writer through the I/O Manager API. |
|
最新喜欢:![]() |
沙发#
发布于:2002-06-14 17:58
这些文章在哪儿找的,给个连接?
|
|
|
板凳#
发布于:2002-06-14 15:47
sorry,忘了链接啊
|
|
地板#
发布于:2002-06-14 15:43
能不能直接给个连接啊?
这样的话,太分散了 |
|
|