|
From: <sv...@va...> - 2007-03-29 22:41:38
|
Author: njn Date: 2007-03-29 23:41:38 +0100 (Thu, 29 Mar 2007) New Revision: 320 Log: Added a tool suggestion. Modified: trunk/help/projects.html Modified: trunk/help/projects.html =================================================================== --- trunk/help/projects.html 2007-03-25 08:33:47 UTC (rev 319) +++ trunk/help/projects.html 2007-03-29 22:41:38 UTC (rev 320) @@ -225,6 +225,22 @@ may be instructive. This is a fairly straightforward project. (Added August 27, 2005)</p> +<h3>New tool: resource alloc/dealloc checker</h3> +<p>Memcheck detects memory leaks and file descriptor leaks. There are other +resource allocators that have alloc/dealloc functions. Some examples: +malloc/free, fopen/fclose, open/close, XOpenDisplay/XCloseDisplay, etc. +It would be nice to check them for leaks in an extensible fashion. +</p> +<p>The tool would have a configuration file where you name the alloc/dealloc +function pairs. Those examples all follow the following pattern in their +type signatures:<br> + token alloc(...)<br> + ... dealloc(token t)<br> +You'd need a way to handle cases where alloc() fails (eg. open() returns +-1). You might also need to handle some slight variations on the above (eg. +an extra arg to the dealloc function). You'd implement it in Valgrind using +function wrapping to know when the alloc/dealloc functions are called. +</p> <h3>Incremental debug info reading</h3> <p>When a code segment is loaded Valgrind mmaps the entire file into |