ftbk86
驱动牛犊
驱动牛犊
  • 注册日期2005-11-29
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分57分
  • 威望402点
  • 贡献值0点
  • 好评度15点
  • 原创分0分
  • 专家分0分
阅读:4030回复:3

为什么我用NdisAllocateMemoryWithTag申请内存后,在NdisFreeMemory释放!有时候会蓝屏?

楼主#
更多 发布于:2010-04-21 12:06
为什么我用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
space061
驱动牛犊
驱动牛犊
  • 注册日期2005-08-03
  • 最后登录2013-05-29
  • 粉丝0
  • 关注0
  • 积分24分
  • 威望272点
  • 贡献值0点
  • 好评度20点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2010-04-21 13:20
"Arg1: 00000007, Attempt to free pool which was already freed"这不是写着原因呢
ftbk86
驱动牛犊
驱动牛犊
  • 注册日期2005-11-29
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分57分
  • 威望402点
  • 贡献值0点
  • 好评度15点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2010-04-21 13:24
这个之前没有释放呢!..为什么释放会这样呢?
hyzimbtb
驱动牛犊
驱动牛犊
  • 注册日期2004-08-27
  • 最后登录2010-11-10
  • 粉丝2
  • 关注0
  • 积分387分
  • 威望216点
  • 贡献值0点
  • 好评度45点
  • 原创分0分
  • 专家分0分
地板#
发布于:2010-05-27 16:26
要看你是不是越界使用了申请的内存
游客

返回顶部