求助malloc导致崩溃!!!
操作系统:winXP
cpu: Intel(R) Pentium(R) Dual CPU
RAM: 2.00GHz
IDE: VC6.0
调用形式如下:
pv = malloc(size);
崩溃时,调用栈信息:
....
NTDLL! 7c96b3a2()
NTDLL! 7c93aa2b()
_heap_alloc_base(unsigned int 17472) line 200
_heap_alloc_dbg(unsigned int 17427, int 1, const char * 0x00000000, int 0) line 378 + 9 bytes
_nh_malloc_dbg(unsigned int 17427, int 0, int 1, const char * 0x00000000, int 0) line 248 + 21 bytes
malloc(unsigned int 17427) line 130 + 21 bytes
Debug窗口输出:
Heap corruption detected at 02ECDC50
HEAP[*.exe]: HEAP: Free Heap block 2ecdc48 modified at 2ecdc58 after it was freed
cpu: Intel(R) Pentium(R) Dual CPU
RAM: 2.00GHz
IDE: VC6.0
调用形式如下:
pv = malloc(size);
崩溃时,调用栈信息:
....
NTDLL! 7c96b3a2()
NTDLL! 7c93aa2b()
_heap_alloc_base(unsigned int 17472) line 200
_heap_alloc_dbg(unsigned int 17427, int 1, const char * 0x00000000, int 0) line 378 + 9 bytes
_nh_malloc_dbg(unsigned int 17427, int 0, int 1, const char * 0x00000000, int 0) line 248 + 21 bytes
malloc(unsigned int 17427) line 130 + 21 bytes
Debug窗口输出:
Heap corruption detected at 02ECDC50
HEAP[*.exe]: HEAP: Free Heap block 2ecdc48 modified at 2ecdc58 after it was freed
...全文
相关推荐
C语言基础之malloc和free函数详解
主要介绍了C语言基础之malloc和free函数详解的相关资料,需要的朋友可以参考下
对malloc使用的一点新理解
昨日在子函数中用malloc申请内存使用后,意外发现在free的时候出现异常错误,后经检查发现原来是实际使用时指针长度超过了申请的范围。
malloc函数详细说明一看就懂
malloc函数详细说明一看就懂
calloc和malloc的区别
本文叙述了calloc和malloc用法的区别,函数malloc()和函数calloc()的主要区别是前者不能初始化所分配的内存空间,而后者能。
浅谈C中的malloc和free
本人叙述了C语言中的malloc和free的用法,以及一些平时我们觉得很模糊的知识点。


