阅读:4101回复:3
为什么我用NdisAllocateMemoryWithTag申请内存后,在NdisFreeMemory释放!有时候会蓝屏?
为什么我用NdisAllocateMemoryWithTag申请内存后,在NdisFreeMemory释放!有时候会蓝屏?
我用 NdisAllocateMemoryWithTag(&pPacketContent,TotalPacketLength,TAG); 申请后 在释放的时候用 if(pPacketContent) NdisFreeMemory(pPacketContent,TotalPacketLength,0); 释放!但是有时候会蓝屏!为什么! BAD_POOL_CALLER (c2) The current thread is making a bad pool request. Typically this is at a bad IRQL level or double freeing the same allocation, etc. Arguments: Arg1: 00000007, Attempt to free pool which was already freed Arg2: 00000cd4, (reserved) Arg3: 00000000, Memory contents of the pool block Arg4: 81374008, Address of the block of pool being deallocated STACK_TEXT: f9dc7108 804f880d 00000003 f9dc7464 00000000 nt!RtlpBreakWithStatusInstruction f9dc7154 804f93fa 00000003 81647858 81374000 nt!KiBugCheckDebugBreak+0x19 f9dc7534 804f9925 000000c2 00000007 00000cd4 nt!KeBugCheck2+0x574 f9dc7554 80544c86 000000c2 00000007 00000cd4 nt!KeBugCheckEx+0x1b f9dc75a4 f96e660f 81374008 00000000 f9dc78a0 nt!ExFreePoolWithTag+0x2a0 f9dc75b4 f779cb6a 81374008 000005c2 00000000 NDIS!NdisFreeMemory+0x3b |
|
沙发#
发布于:2010-04-21 13:20
"Arg1: 00000007, Attempt to free pool which was already freed"这不是写着原因呢
|
|
板凳#
发布于:2010-04-21 13:24
这个之前没有释放呢!..为什么释放会这样呢?
|
|
地板#
发布于:2010-05-27 16:26
要看你是不是越界使用了申请的内存
|
|