malhenry
Mon Jul 25 13:56:01 CDT 2005
Yes it would be helpful to test with VC 6.
Your last reply got me around the compile problems. I ran a trivial test,
but did not get any helpful output. Maybe I am not doing something correctly?
Here is my code:
// TestMemLeak.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "leakfinder.h"
// enable memory leak detection
#include "TestMemLeak.h"
int main(int argc, char* argv[])
{
double *pDouble = new double( 3.14159 );
InitLeakFinder(OutputVerbose);
// don't execute the next line if you want a leak
// delete pDouble;
TestMem2();
DeinitLeakFinder();
return 0;
}
=====================
// stdafx.cpp : source file that includes just the standard includes
// TestMemLeak.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
==================
//testmem2.cpp
void TestMem2()
{
int * arrayPtr = new int[10];
return;
}
===========
//testmemleak.h
// prototypes
void TestMem2();
=================
Here is the output provided by your program to the debug window:
Loaded 'ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information
found.
Loaded 'C:\WINDOWS\system32\ole32.dll', no matching symbolic information
found.
Loaded 'C:\WINDOWS\system32\advapi32.dll', no matching symbolic information
found.
Loaded 'C:\WINDOWS\system32\rpcrt4.dll', no matching symbolic information
found.
Loaded 'C:\WINDOWS\system32\gdi32.dll', no matching symbolic information
found.
Loaded 'C:\WINDOWS\system32\user32.dll', no matching symbolic information
found.
Loaded 'C:\WINDOWS\system32\msvcrt.dll', no matching symbolic information
found.
Loaded 'C:\WINDOWS\system32\version.dll', no matching symbolic information
found.
Loaded 'C:\WINDOWS\system32\xpsp2res.dll', no matching symbolic information
found.
Loaded 'C:\WINDOWS\system32\dbghelp.dll', no matching symbolic information
found.
######## CRT-Leaks ########
C:\Projects\TestMemLeak\Debug\TestMemLeak.exe:TestMemLeak.exe
(00400000), size: 233472 (result: 0)
C:\WINDOWS\system32\ntdll.dll:ntdll.dll (7C900000), size: 720896
(result: 0), fileVersion: 5.1.2600.2180
C:\WINDOWS\system32\kernel32.dll:kernel32.dll (7C800000), size: 999424
(result: 0), fileVersion: 5.1.2600.2180
C:\WINDOWS\system32\ole32.dll:ole32.dll (774E0000), size: 1298432
(result: 0), fileVersion: 5.1.2600.2595
C:\WINDOWS\system32\ADVAPI32.dll:ADVAPI32.dll (77DD0000), size: 634880
(result: 0), fileVersion: 5.1.2600.2180
C:\WINDOWS\system32\RPCRT4.dll:RPCRT4.dll (77E70000), size: 593920
(result: 0), fileVersion: 5.1.2600.2180
C:\WINDOWS\system32\GDI32.dll:GDI32.dll (77F10000), size: 286720
(result: 0), fileVersion: 5.1.2600.2180
C:\WINDOWS\system32\USER32.dll:USER32.dll (77D40000), size: 589824
(result: 0), fileVersion: 5.1.2600.2622
C:\WINDOWS\system32\msvcrt.dll:msvcrt.dll (77C10000), size: 360448
(result: 0), fileVersion: 7.0.2600.2180
C:\WINDOWS\system32\VERSION.dll:VERSION.dll (77C00000), size: 32768
(result: 0), fileVersion: 5.1.2600.2180
C:\WINDOWS\system32\xpsp2res.dll:xpsp2res.dll (20000000), size: 2904064
(result: 0), fileVersion: 5.1.2600.2180
C:\WINDOWS\system32\dbghelp.dll:dbghelp.dll (59A60000), size: 659456
(result: 0), fileVersion: 5.1.2600.2180
ERROR: SymGetSymFromAddr, GetLastError: 487 (Address: 0040256F)
ERROR: SymGetLineFromAddr, GetLastError: 487 (Address: 0040256F)
ERROR: SymGetModuleInfo, GetLastError: 87 (Address: 0040256F)
--------------- Key: 52, 40 bytes ---------
Call stack:
0040256F ((module-name not available)): (filename not available):
(function-name not available)
ERROR: SymGetSymFromAddr, GetLastError: 487 (Address: 00406ECF)
ERROR: SymGetLineFromAddr, GetLastError: 487 (Address: 00406ECF)
ERROR: SymGetModuleInfo, GetLastError: 87 (Address: 00406ECF)
00406ECF ((module-name not available)): (filename not available):
(function-name not available)
ERROR: SymGetSymFromAddr, GetLastError: 487 (Address: 00406DF9)
ERROR: SymGetLineFromAddr, GetLastError: 487 (Address: 00406DF9)
ERROR: SymGetModuleInfo, GetLastError: 87 (Address: 00406DF9)
00406DF9 ((module-name not available)): (filename not available):
(function-name not available)
ERROR: SymGetSymFromAddr, GetLastError: 487 (Address: 00406DD6)
ERROR: SymGetLineFromAddr, GetLastError: 487 (Address: 00406DD6)
ERROR: SymGetModuleInfo, GetLastError: 87 (Address: 00406DD6)
00406DD6 ((module-name not available)): (filename not available):
(function-name not available)
ERROR: SymGetSymFromAddr, GetLastError: 487 (Address: 00406D4F)
ERROR: SymGetLineFromAddr, GetLastError: 487 (Address: 00406D4F)
ERROR: SymGetModuleInfo, GetLastError: 87 (Address: 00406D4F)
00406D4F ((module-name not available)): (filename not available):
(function-name not available)
ERROR: SymGetSymFromAddr, GetLastError: 487 (Address: 0040687F)
ERROR: SymGetLineFromAddr, GetLastError: 487 (Address: 0040687F)
ERROR: SymGetModuleInfo, GetLastError: 87 (Address: 0040687F)
0040687F ((module-name not available)): (filename not available):
(function-name not available)
ERROR: SymGetSymFromAddr, GetLastError: 487 (Address: 0040690F)
ERROR: SymGetLineFromAddr, GetLastError: 487 (Address: 0040690F)
ERROR: SymGetModuleInfo, GetLastError: 87 (Address: 0040690F)
0040690F ((module-name not available)): (filename not available):
(function-name not available)
ERROR: SymGetSymFromAddr, GetLastError: 487 (Address: 0040A269)
ERROR: SymGetLineFromAddr, GetLastError: 487 (Address: 0040A269)
ERROR: SymGetModuleInfo, GetLastError: 87 (Address: 0040A269)
0040A269 ((module-name not available)): (filename not available):
(function-name not available)
ERROR: SymGetLineFromAddr, GetLastError: 487 (Address: 7C816D4F)
ERROR: SymGetModuleInfo, GetLastError: 87 (Address: 7C816D4F)
7C816D4F ((module-name not available)): (filename not available):
RegisterWaitForInputIdle
######## COM-Leaks ########
The program 'C:\Projects\TestMemLeak\Debug\TestMemLeak.exe' has exited with
code 0 (0x0).
Thanks.
"Jochen Kalmbach [MVP]" wrote:
> Hi malhenry!
> > Ok, so I am trying to use your code. I am using VC++ 6.0 and Win XP Pro (32
> > not 64).
>
> Sorry... I never tested it with VC6... (maybe I sould do it...)
>
>
> > Now I get: error C2653: 'super' : is not a class or namespace name
> > Why is the compiler not finding super???
>
> Just replace "__super" with "CallStackInterface"
>
>
> --
> Greetings
> Jochen
>
> My blog about Win32 and .NET
>
http://blog.kalmbachnet.de/
>