请输入您要查询的百科知识:

 

词条 Electric Fence
释义

  1. See also

  2. External links

For the physical barrier, see electric fence.

Electric Fence (or eFence) is a memory debugger written by Bruce Perens. It consists of a library which programmers can link into their code to override the C standard library memory management functions. eFence triggers a program crash when the memory error occurs, so a debugger can be used to inspect the code that caused the error.

Electric Fence is intended to find two common types of programming bugs:

  • Overrunning the end (or beginning) of a dynamically allocated buffer
  • Using a dynamically allocated buffer after returning it to the heap

In both cases, Electric Fence causes the errant program to abort immediately via a segmentation fault. Normally, these two errors would cause heap corruption, which would manifest itself only much later, usually in unrelated ways. Thus, Electric Fence helps programmers find the precise location of memory programming errors.

Electric Fence allocates at least two pages (often 8KB) for every allocated buffer. In some modes of operation, it does not deallocate freed buffers. Thus, Electric Fence vastly increases the memory requirements of programs being debugged. This leads to the recommendation that programmers should apply Electric Fence to smaller programs when possible, and should never leave Electric Fence linked against production code.

Electric Fence is free software licensed under the GNU General Public License.

See also

{{Portal|Free and open-source software}}
  • Dmalloc

External links

  • Electric Fence 2.2.4 source code from Ubuntu
  • DUMA – a fork of Electric Fence which also works for Windows
  • [https://web.archive.org/web/20140221184643/http://rpmfind.net//linux/RPM/fedora/devel/rawhide/src/e/ElectricFence-2.2.2-38.fc20.src.html eFence-2.2.2] – rpm of electric fence 2.2.2 source

4 : Free memory debuggers|Free software testing tools|Software testing tools|Free memory management software

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/21 17:52:06