文件名称:debugging_malloc
- 所属分类:
- 系统编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 300kb
- 下载次数:
- 0次
- 提 供 者:
- j*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
编写标准函数的包装模块解决内存漏洞问题
通常的malloc和free代码是不允许调用者存在错误的,比如说在程序引用越界、忘记释放内存块,或将一个内存块释放了两次,这些错误通常不会立即影响程序的执行,但当程序用到错误的内存时,已分配的内存过多时,程序就会开始不正常,用程序跟踪调试检查错误出现的地方会很困难。
本次实验的任务就是为malloc和free写一个包装模块,使用这个模块可以发现代码中的上述错误。-The preparation of the standard function module packaging solution to memory leak issues are usually the malloc and free code is not allowed there is an error in the caller, for example, cited in cross-border procedures, to forget to release memory block, or the release of a block of memory twice, these errors are usually would not immediately affect the implementation of the procedures, but used the wrong procedural memory have been allocated too much memory, the program will begin non-normal procedures to check for errors appears tracking debugging will be very difficult to place. The experimental task is to malloc and free to write a packaging module, use this module can be found in the code for the mistake.
通常的malloc和free代码是不允许调用者存在错误的,比如说在程序引用越界、忘记释放内存块,或将一个内存块释放了两次,这些错误通常不会立即影响程序的执行,但当程序用到错误的内存时,已分配的内存过多时,程序就会开始不正常,用程序跟踪调试检查错误出现的地方会很困难。
本次实验的任务就是为malloc和free写一个包装模块,使用这个模块可以发现代码中的上述错误。-The preparation of the standard function module packaging solution to memory leak issues are usually the malloc and free code is not allowed there is an error in the caller, for example, cited in cross-border procedures, to forget to release memory block, or the release of a block of memory twice, these errors are usually would not immediately affect the implementation of the procedures, but used the wrong procedural memory have been allocated too much memory, the program will begin non-normal procedures to check for errors appears tracking debugging will be very difficult to place. The experimental task is to malloc and free to write a packaging module, use this module can be found in the code for the mistake.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
debugging_malloc
................\Debug
................\debugmalloc.c
................\debugmalloc.dep
................\debugmalloc.dsp
................\debugmalloc.dsw
................\debugmalloc.exe
................\debugmalloc.h
................\debugmalloc.ilk
................\debugmalloc.mak
................\debugmalloc.ncb
................\debugmalloc.opt
................\debugmalloc.pdb
................\debugmalloc.plg
................\dmhelper.c
................\dmhelper.h
................\driver.c
................\getopt.c
................\getopt.h
................\grader.pl
................\tailor.h
................\Debug
................\debugmalloc.c
................\debugmalloc.dep
................\debugmalloc.dsp
................\debugmalloc.dsw
................\debugmalloc.exe
................\debugmalloc.h
................\debugmalloc.ilk
................\debugmalloc.mak
................\debugmalloc.ncb
................\debugmalloc.opt
................\debugmalloc.pdb
................\debugmalloc.plg
................\dmhelper.c
................\dmhelper.h
................\driver.c
................\getopt.c
................\getopt.h
................\grader.pl
................\tailor.h