MLK: memory leak

An MLK message describes heap memory that you have leaked. There are no pointers to this block, or to anywhere within this block.

image\mlk.gif

To generate a list of leaked memory blocks, use the API function purify_new_leaks or purify_all_leaks, or set the option -leaks-at-exit=yes (the default).

A memory leak is caused when the last pointer referencing a block of memory is cleared, changed, or goes out of scope. If the section of the program where the memory is allocated and leaked is executed repeatedly, you might eventually run out of swap space. This is a serious problem for long-running applications.

Memory that is allocated once, referenced by a pointer (perhaps static or global) and never freed is not a leak and does not generate an MLK message. Since it is allocated only once, you cannot run out of memory during extended use of the program.