Location:
Search - debugging_mall
Search list
Description: 编写标准函数的包装模块解决内存漏洞问题
通常的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.
Platform: |
Size: 307200 |
Author: js |
Hits: