阅读:1473回复:0
驱动的代码和数据默认都是放到非分页内存中吧?
修改了passthru,在有的机器上总是蓝屏
看了这个帖子 http://bbs.driverdevelop.com/htm_data/10/0705/102172.html 我也是自定义了一个函数,其中定义了一个100的数组,然后 NdisMoveMemory, 为什么最后的回复说 分配的数组是Paged Memory,所以可能会产生缺页而蓝屏 DDK的帮助文档说默认是放到非分页中吧,数组所在的内核堆栈难道能放到分页中? DDK: By default, the code for kernel-mode drivers is not pageable, nor is the global memory used by kernel-mode drivers pageable. You can make code pageable by adding the #pragma alloc_text compiler directive at the top of the file containing the code. The driver can then lock and unlock the code dynamically at run time by calling memory manager routines MmLockPagableCodeSection and MmUnlockPagableImageSection. For more information, see Locking Pageable Code or Data. |
|