Electric Fence

Electric Fence

: "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 heapIn 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.

ee also

* Dmalloc

External links

* [http://perens.com/FreeSoftware/ElectricFence/ eFence] – source code
* [http://sourceforge.net/projects/duma DUMA] – a fork of Electric Fence


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Electric Fence — Electric Fence, eFence  отладчик памяти, написанный Брюсом Перенсом. Представляет собой библиотеку, с которой программист может скомпоновать свой код и перекрыть вызовы функций распределения памяти стандартной библиотеки языка Си. eFence… …   Википедия

  • Electric Fence — (ou eFence) est une bibliothèque logicielle libre conçue pour faciliter le débogage de la gestion de la mémoire. La bibliothèque a été conçue et écrite par Bruce Perens. C est une bibliothèque utilisée dans la correction des erreurs de programmes …   Wikipédia en Français

  • electric fence — ► NOUN ▪ a fence through which an electric current can be passed, giving an electric shock to any person or animal touching it …   English terms dictionary

  • Electric fence — An electric fence is a barrier that uses electric shocks to deter animals or people from crossing a boundary. The voltage of the shock may have effects ranging from uncomfortable, to painful or even lethal. Most electric fencing is used today for …   Wikipedia

  • electric fence — noun : a wire fence electrically charged to give animals touching it a slight warning shock * * * eˌlectric ˈfence [electric fence] noun a wire fence through which an electric current can be passed …   Useful english dictionary

  • electric fence — /əˌlɛktrɪk ˈfɛns/ (say uh.lektrik fens) noun 1. a fence through which an electric current passes, used to deter intruders. 2. a fence, one or two wires of which are periodically energised by a high tension voltage to keep animals back. Also,… …  

  • electric fence — noun a fence through which an electric current can be passed, giving an electric shock to any person or animal touching it …   English new terms dictionary

  • Electric fencing (disambiguation) — Electric fencing may refer to:* Electric fence, a type of fence * Electric sport fencing * Electric Fence, a memory debugger …   Wikipedia

  • Fence — A fence is a freestanding structure designed to restrict or prevent movement across a boundary. It is generally distinguished from a wall by the lightness of its construction: a wall is usually restricted to such barriers made from solid brick or …   Wikipedia

  • electric — adj. & n. adj. 1 of, worked by, or charged with electricity; producing or capable of generating electricity. 2 causing or charged with sudden and dramatic excitement (the news had an electric effect; the atmosphere was electric). n. 1 an electric …   Useful english dictionary

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”