Electric Fence is a free tool that is used to debug memory usage errors in C programs. It helps with Tcl extensions and even possibly with the Tcl core.