If this is your product, you can request to edit it here.
"Great to have in the toolbox"
Summary:
Dmalloc is an open source tool for finding problems with memory—allocation, leaks, etc. It comes with Montevista Linux, but it is also useful for Ubuntu. Memory leaks are both destructive and difficult to spot, so Dmalloc is always at the ready in my toolbox. If you use it for dynamic analysis, be sure that you use another comparable debugger first, because Dmalloc is best at this specific niche of the test process, though it was originally designed for debugging large programs. Note that you may be able to find some, but not all of the memory leaks that Dmalloc finds through looking for collection classes, but that becomes tedious after a while. I’ve also been warned against using Dmalloc for C++, so I’ll leave that out there. Dmalloc was created by a single programmer, whose site is still up for support.
"Dmalloc has its advantages & disadvantages"
Summary:
The author of dmalloc, a tool I covered in detail in the September 2002 article, states that his knowledge of C++ is limited, and thus the C++ detection of memory leaks also is limited. In order to use dmalloc with C++ and threads, it has been necessary to link the application as static, which I believe is a considerable disadvantage. That said, dynamic program analysis was long considered to be a too heavyweight approach to defect detection; its results didn't justify the effort and resources required. However, there are two important trends in the modern software development industry which allow a new look at this problem. On the one hand, as the size and complexity of software steadily increase, any automatic defect detection tool can prove to be helpful. On the other hand, the steady increase in the performance of modern computer systems makes it possible to solve more and more complicated computational problems efficiently. The recent surveys in the field of dynamic analysis, such as SAGE, EXE and Flayer show that, despite the complexity inherent in the dynamic analysis approach, it can be successfully applied for at least a certain kind of programs. In addition to these research projects, we should note Dmalloc is one of the most successful open source projects in this field. Its popularity on Linux platform proves that the use of dynamic analysis is justified in the case if it is able to reliably detect actual bugs and can work completely automatically, that is, without any interference of programmer or tester.
|
What does this code do?
public class Demo { public void method1() { synchronized (String.class) { System.out.println("on String.class object"); synchronized (Integer.class) { System.out.println("on Integer.class object"); } } }
Programming Language: Java