在一个函数用NdisAllocateMemoryWithTag申请内存,出现如此错误!

cd0054115   2010-4-21 15:43 楼主
我在一个函数中用 NdisAllocateMemoryWithTag申请内存!为什么出现蓝屏错误!

An attempt was made to access a pageable (or completely invalid) address at an
interrupt request level (IRQL) that is too high.  This is
caused by drivers that have corrupted the system pool.  Run the driver
verifier against any new (or suspect) drivers, and if that doesn't turn up
the culprit, then use gflags to enable special pool.
Arguments:
Arg1: 00000004, memory referenced
Arg2: 00000002, IRQL
Arg3: 00000001, value 0 = read operation, 1 = write operation
Arg4: 805456f3, address which referenced memory

f9dc700c 804f880d 00000003 f9dc7368 00000000 nt!RtlpBreakWithStatusInstruction
f9dc7058 804f93fa 00000003 00000004 805456f3 nt!KiBugCheckDebugBreak+0x19
f9dc7438 80540853 0000000a 00000004 00000002 nt!KeBugCheck2+0x574
f9dc7438 805456f3 0000000a 00000004 00000002 nt!KiTrap0E+0x233
f9dc7520 f96e6158 00000000 00000001 496d5061 nt!ExAllocatePoolWithTag+0x673
f9dc7534 f762608a f9dc7584 000005f4 496d5061 NDIS!NdisAllocateMemoryWithTag+0x13
WARNING: Stack unwind information not available. Following frames may be wrong.

回复评论 (5)

NdisAllocateMemoryWithTag要求中断级别不大于DISPATCH_LEVEL,否则会蓝屏。检查你调用时的中断级别,必要时可降低级别。
点赞  2010-4-21 16:03
我想除了这个中断级别外,还有其他导致整个蓝屏错误的么?
点赞  2010-4-21 16:12
暂时我还没想到其他的可能,内存耗尽是会返回错误的,不会蓝屏吧。
点赞  2010-4-21 17:08
但是我

DbgPrint("        KeGetCurrentIrql = %d\r\n", KeGetCurrentIrql());
返回的是2
NdisAllocateMemoryWithTag 的IRQL <= DISPATCH_LEVEL 这样看来是没有错误的啊!
点赞  2010-4-21 23:11
级别  dispatch_level =2 么?
点赞  2010-4-21 23:18
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复