用C堆错误 [英] Heap error in C

查看:160
本文介绍了用C堆错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这是真的很一般,但我得到的this(见下文)当我运行在Visual C ++ 2008例preSS我.c文件。当我打电话这种事的malloc()。就拿这个我的工作 - 我正确的动态分配内存。

I know this is really general, but I get "this" (see below) when I run my .c file in Visual C++ 2008 Express. It happens when I call malloc (). Take my work on this - I dynamically allocate memory properly.

HEAP [code.exe]:堆:在211af8修改免费堆块211a10它被释放后
  Windows已经引发了code.exe一个断点。

HEAP[Code.exe]: HEAP: Free Heap block 211a10 modified at 211af8 after it was freed Windows has triggered a breakpoint in Code.exe.

这可能是由于堆的腐败,这表明在code.exe或已加载的DLL的错误。

This may be due to a corruption of the heap, which indicates a bug in Code.exe or any of the DLLs it has loaded.

这也可能是由于用户pressing F12,而code.exe拥有焦点。

This may also be due to the user pressing F12 while Code.exe has focus.

输出窗口可能有更多的诊断信息。

The output window may have more diagnostic information.

为什么我得到这个错误?这是什么意思,甚至?

Why do I get this error? What does this even mean?

推荐答案

该错误消息告诉您究竟为什么你说对了:

The error message tells you exactly why you got it:

在211af8修改了它被释放后,空闲堆块211a10

Free Heap block 211a10 modified at 211af8 after it was freed

您已经被释放的东西,然后写信给该区域的内存堆中分配的块。这不是很好写的内存释放的块。

You had a heap allocated block that was freed then something wrote to that area of memory. It's not nice to write to a freed block of memory.

这篇关于用C堆错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆