Languages: عربي | Asturianu | Català | Česky | Kaszëbsczi | Dansk | Deutsch | English | Esperanto | Español | Eesti | فارسی | Suomi | Français | Galego | Italiano | 日本語 | 한국어 | Norwegian | Polski | Português Brasileiro | Română | Русский | Svenska | Slovenčina | Slovenščina | српски | Türkçe | Tiếng Việt | Українська | 简体中文 | 繁體中文
MALLOC_CHECK_ is an environment variable used by the GNU C Library (glibc) to automatically enable an extensive suite of debugging functions, which check for proper memory allocation, usage, and deallocation. It includes options to enable aborting a program as soon as corruption is detection and for printing out error messages.
KDE enables MALLOC_CHECK_ by default in development versions of KDE by setting the environment variable in the startkde script, from among the following possibilities:
|An exception to the automatic variable setting is that if MALLOC_CHECK_ is already set to a value when startkde is run, startkde will not change that value.|
More information is available in the man page for malloc(3), and in the "Heap Consistency Checking" GNU info page for libc. (Konqueror users can open info:/libc/Heap Consistency Checking)
This checking may reveal bugs in programs, with a " *** glibc: corruption detected" message (or similar). See an example of a crash because of this variable.
Note that these crashes are not bugs with MALLOC_CHECK_, but a bug in the program which has gone unnoticed up to this point.
If you are a developer experiencing crashes due to this checking and you are unable to diagnose the source of the bug, it may be fruitful to use the Valgrind tool to search for the source of the error.