Opened 14 years ago Closed 12 years ago #66 closed enhancement (wontfix)Tracing memory allocation
Description
Recently, we have many problems related to improper memory usage, such as memory leak (ticket #13,#14,#18,#19,#65), excessive memory allocation (ticket #57), too many times of memory allocation (ticket #21). To ease the detection of memory problems, a memory tracing tool is proposed. A patch based on revision 176 is attached (most of revisions are replacement of conventional memory allocation functions with new macros). The features of the tool are as follows.
1, Log of memory leak (file and line).
Further features can be easily added if necessary.
With the memory log information, any memory leak or improper memory usage can be easily noticed by algorithm proponents and software coordinators.
The tool is easy to use. After including tool_tracemem.cpp and tool_tracemem.h into source/Lib/TLibCommon, what you have to do is using new macro MEMNEW/MEMDELETE to replace the conventional new/delete. Attachments (2)Change History (7)Changed 14 years ago by li@…comment:1 Changed 14 years ago by tung@…
Why not overload new and delete operator instead of change every new/delete by the macro? comment:2 Changed 13 years ago by davidf
Updating component after adding WD (Text) tickets comment:3 Changed 13 years ago by davidf
comment:4 Changed 13 years ago by davidf
comment:5 Changed 12 years ago by ksuehring
As mentioned before there exist a number of 3rd party tools and libraries that can trace memory allocation (e.g. Valgrind, Visual Leak Detector, Purify, etc.). I don't see a need to modify our software. Note: See
TracTickets for help on using
tickets. | This list contains all users that will be notified about changes made to this ticket. These roles will be notified: Reporter, Owner, Subscriber, Participant
|
Patch based on revision 176