General
Reliability
Contact and feedback
License and redistribute
For newbies
What's Denomo? Top
Denomo is a debug assistant tool to let programmers easily detect memory leak and locate the memory leak source quickly.
Where can I find document on using Denomo? Top
There is a directory called 'help' in the Denomo directory. There are some detailed document in it. To browse them, open index.html in a web browser.
How to integrate Denomo to my project? Top
Place the unit "Denomo.pas" as the very first unit under the "uses" section in your project's .dpr file.
If you use another memory manager explicitly, e.g, FastMM, put the unit "Denomo.pas" just under the memory manager.
NOTE: You should only include that unit in your internal debug version. NEVER put it into the release version because that unit is only useful when debugging and it will cause more memory and slightly slow down the program.
I'm using LeakInspector to exam the memory, what does the mysterious output information mean? Top
The help file inspector.html in denomohelp contains a detailed explanation on the information.
The stack trace is very rough. Many caller procedures are skipped and not reported, why? Top
Maybe you forget to enable stack frames. In Delphi IDE, click menu Project->Options->Compiler, enable "Stack frames" in "Code generation" section.
Denomo uses frame based stack algorithm to get the stack trace, so if "Stack frames" is not enabled, the compiler will not generate stack frame for many simple procedures.
Why there is no source information in the memory leak report? Top
To report source information, you must enable TD32 information. In Delphi IDE, click menu Project->Options->Linker, see "EXE and DLL options".
What does "Free twice" or "Double free" mean? And how to enable or disable this detection? Top
Option KeepTrackOnFreedBlock and KeepDetailedTrackOnFreedBlock in file DenomoConfig.pas can enable/disable this feature.
"Free twice" means a memory block is free again after it has been freed.
Such bug can cause very hard caught access violation errors.
So this feature is very useful.
But be careful with this feature. Enabling this feature will cause memory usage grows dramatically and if your program uses a lot of memory and runs for relative long time during debugging, all memory will be eaten up eventually.
And If you use FastMM, Delphi 2006 or 2007, they have already had built-in detection on this problem.
If Denomo reports NO memory leaks on exit and in any session, does it mean there is no memory leak in my program? Top
The answer is YES for most programs. It means your project has no any memory leak that allocated by Delphi memory manager (GetMem), and of course also means no any objects are leaked.
But if your project heavily depends on Windows memory allocation function such as VirtualAlloc, GlobalAlloc, HeapAlloc, etc, Denomo can't detect if any memory leaks. However, the good news is detection on Windows memory allocation functions will be added in the future release.
If Denomo reports memory leaks on exit, does it mean those leaks are really memory leak? Top
Definitely yes. On exiting program, Denomo reports all memory blocks that aren't freed. When Denomo does that report, your program has been in the final stage and doesn't have chance to free any memory. So the leaks are really leaks.
However, in my personal opinion, you usually don't need to care such "leak" too much unless you are rich in time. Because after the program exits, the OS will reclaim all memory from your program, so your program will never leak memory after it exits.
Focus on session leak detection rather than on exit leak.
If Denomo reports memory leaks in a session, does it mean those leaks are really memory leak? Top
Maybe yes, maybe no, it depends.
In a session, Denomo can only keep track of which memory block is new allocated in the session, and after the session, Denomo will report the new memory blocks as leaked if they still exist after the session.
Then the problem is, in the session, if the program frees a memory block which is allocated before the session, and then allocates a new block to replace the old block on purpose, that new block will be marked as "leak" though it is not a real leak.
Delphi VCL often does the fake leak. For instance, in unit Graphics, the graphics object such as TPen will frequently call TResourceManager.ChangeResource to free and allocate new memory block.
How to distinguish fake leak? Top
Usually you'd better focus on the leaks that really allocated from within your code rather than VCL or other huge code library. To know whether it's allocated by your code, see the stack trace. If there is no address in your code range, it usually means it's not leak by your fault.
Where is the official Denomo website? Top
http://www.kbasm.com/
Who is the original author of Denomo? Top
Wang Qi (family name: Wang), from China, Beijing.
How to contact the original author? Top
Send mail to "kbasm.com AT gmail D.O.T com"
Bug report, feature request, or any discussion on Denomo, are welcome.
What's the license of Denomo? Top
MPL 1.1.
You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html
I've improved the code, can I redistribute the modified code to others? Top
Yes, according to the license. But you are highly recommended and encouraged to send the modified code to the original author. The reason is simple. The original author may decide to include the improvement in the "official" release to improve Denomo's quality.
After adding "Denomo" to the "uses" clause, why Delphi reports error that "File not found: 'Denomo.dcu'"? Top
You need to add the path where Denomo sits in to your project search path.
In Delphi IDE, click menu Projects then Options, in the pop up dialog, switch to the "Directories and Conditionals" tab, then add the path of Denomo and DenomoDisasm32 to the "Search path".
When running my program with Denomo inside, why Denomo reports an error that some DLLs can't be found? Top
You need to change RuntimeDllDirectory in DenomoConfig.pas to ensure it points to where DenomoRuntime.dll is. Another better approach is just leave that constant blank ('') and copy DenomoRuntime.dll to where your program is.
- 1, What's Denomo?
- 2, Where can I find document on using Denomo?
- 3, How to integrate Denomo to my project?
- 4, I'm using LeakInspector to exam the memory, what does the mysterious output information mean?
- 5, The stack trace is very rough. Many caller procedures are skipped and not reported, why?
- 6, Why there is no source information in the memory leak report?
- 7, What does "Free twice" or "Double free" mean? And how to enable or disable this detection?
Reliability
- 1, If Denomo reports NO memory leaks on exit and in any session, does it mean there is no memory leak in my program?
- 2, If Denomo reports memory leaks on exit, does it mean those leaks are really memory leak?
- 3, If Denomo reports memory leaks in a session, does it mean those leaks are really memory leak?
- 4, How to distinguish fake leak?
Contact and feedback
- 1, Where is the official Denomo website?
- 2, Who is the original author of Denomo?
- 3, How to contact the original author?
License and redistribute
- 1, What's the license of Denomo?
- 2, I've improved the code, can I redistribute the modified code to others?
For newbies
- 1, After adding "Denomo" to the "uses" clause, why Delphi reports error that "File not found: 'Denomo.dcu'"?
- 2, When running my program with Denomo inside, why Denomo reports an error that some DLLs can't be found?
What's Denomo? Top
Denomo is a debug assistant tool to let programmers easily detect memory leak and locate the memory leak source quickly.
Where can I find document on using Denomo? Top
There is a directory called 'help' in the Denomo directory. There are some detailed document in it. To browse them, open index.html in a web browser.
How to integrate Denomo to my project? Top
Place the unit "Denomo.pas" as the very first unit under the "uses" section in your project's .dpr file.
If you use another memory manager explicitly, e.g, FastMM, put the unit "Denomo.pas" just under the memory manager.
NOTE: You should only include that unit in your internal debug version. NEVER put it into the release version because that unit is only useful when debugging and it will cause more memory and slightly slow down the program.
I'm using LeakInspector to exam the memory, what does the mysterious output information mean? Top
The help file inspector.html in denomohelp contains a detailed explanation on the information.
The stack trace is very rough. Many caller procedures are skipped and not reported, why? Top
Maybe you forget to enable stack frames. In Delphi IDE, click menu Project->Options->Compiler, enable "Stack frames" in "Code generation" section.
Denomo uses frame based stack algorithm to get the stack trace, so if "Stack frames" is not enabled, the compiler will not generate stack frame for many simple procedures.
Why there is no source information in the memory leak report? Top
To report source information, you must enable TD32 information. In Delphi IDE, click menu Project->Options->Linker, see "EXE and DLL options".
What does "Free twice" or "Double free" mean? And how to enable or disable this detection? Top
Option KeepTrackOnFreedBlock and KeepDetailedTrackOnFreedBlock in file DenomoConfig.pas can enable/disable this feature.
"Free twice" means a memory block is free again after it has been freed.
Such bug can cause very hard caught access violation errors.
So this feature is very useful.
But be careful with this feature. Enabling this feature will cause memory usage grows dramatically and if your program uses a lot of memory and runs for relative long time during debugging, all memory will be eaten up eventually.
And If you use FastMM, Delphi 2006 or 2007, they have already had built-in detection on this problem.
If Denomo reports NO memory leaks on exit and in any session, does it mean there is no memory leak in my program? Top
The answer is YES for most programs. It means your project has no any memory leak that allocated by Delphi memory manager (GetMem), and of course also means no any objects are leaked.
But if your project heavily depends on Windows memory allocation function such as VirtualAlloc, GlobalAlloc, HeapAlloc, etc, Denomo can't detect if any memory leaks. However, the good news is detection on Windows memory allocation functions will be added in the future release.
If Denomo reports memory leaks on exit, does it mean those leaks are really memory leak? Top
Definitely yes. On exiting program, Denomo reports all memory blocks that aren't freed. When Denomo does that report, your program has been in the final stage and doesn't have chance to free any memory. So the leaks are really leaks.
However, in my personal opinion, you usually don't need to care such "leak" too much unless you are rich in time. Because after the program exits, the OS will reclaim all memory from your program, so your program will never leak memory after it exits.
Focus on session leak detection rather than on exit leak.
If Denomo reports memory leaks in a session, does it mean those leaks are really memory leak? Top
Maybe yes, maybe no, it depends.
In a session, Denomo can only keep track of which memory block is new allocated in the session, and after the session, Denomo will report the new memory blocks as leaked if they still exist after the session.
Then the problem is, in the session, if the program frees a memory block which is allocated before the session, and then allocates a new block to replace the old block on purpose, that new block will be marked as "leak" though it is not a real leak.
Delphi VCL often does the fake leak. For instance, in unit Graphics, the graphics object such as TPen will frequently call TResourceManager.ChangeResource to free and allocate new memory block.
How to distinguish fake leak? Top
Usually you'd better focus on the leaks that really allocated from within your code rather than VCL or other huge code library. To know whether it's allocated by your code, see the stack trace. If there is no address in your code range, it usually means it's not leak by your fault.
Where is the official Denomo website? Top
http://www.kbasm.com/
Who is the original author of Denomo? Top
Wang Qi (family name: Wang), from China, Beijing.
How to contact the original author? Top
Send mail to "kbasm.com AT gmail D.O.T com"
Bug report, feature request, or any discussion on Denomo, are welcome.
What's the license of Denomo? Top
MPL 1.1.
You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html
I've improved the code, can I redistribute the modified code to others? Top
Yes, according to the license. But you are highly recommended and encouraged to send the modified code to the original author. The reason is simple. The original author may decide to include the improvement in the "official" release to improve Denomo's quality.
After adding "Denomo" to the "uses" clause, why Delphi reports error that "File not found: 'Denomo.dcu'"? Top
You need to add the path where Denomo sits in to your project search path.
In Delphi IDE, click menu Projects then Options, in the pop up dialog, switch to the "Directories and Conditionals" tab, then add the path of Denomo and DenomoDisasm32 to the "Search path".
When running my program with Denomo inside, why Denomo reports an error that some DLLs can't be found? Top
You need to change RuntimeDllDirectory in DenomoConfig.pas to ensure it points to where DenomoRuntime.dll is. Another better approach is just leave that constant blank ('') and copy DenomoRuntime.dll to where your program is.