kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #00174
KiCad: is there an "overall header file"?
-
To:
kicad-devel@xxxxxxxxxxxxxxx
-
From:
"Geert Vancompernolle" <geert.vancompernolle@...>
-
Date:
Sat, 18 Nov 2006 09:42:37 -0000
-
User-agent:
eGroups-EW/0.82
Hi,
For KiCad, is there somewhere a kind of "overall header file", which
is included in all source files?
The problem is the following:
- I compiled KiCad with Visual C++ 2005 Express Edition (works fine).
- When I run an exe in debug mode, for instance EeSchema, and I finish
the application while in debug mode, the debugger returns me lots of
memory leaks as follows:
'eeschema.exe': Unloaded 'C:\WINDOWS\system32\version.dll'
'eeschema.exe': Loaded 'C:\WINDOWS\system32\MSCTFIME.IME', No symbols
loaded.
'eeschema.exe': Loaded 'C:\WINDOWS\system32\mslbui.dll', No symbols
loaded.
Detected memory leaks!
Dumping objects ->
{40887} normal block at 0x0187DD28, 32 bytes long.
Data: < 18 n> 01 00 00 00 0B 00 00 00 13 00 00 00 31 38 20 6E
{40873} normal block at 0x0187D3B8, 12 bytes long.
Data: < G' ò ä> 08 47 92 00 01 00 00 00 F2 1E 04 E4
{40872} normal block at 0x0187D468, 48 bytes long.
Data: < # <unk> 01 00 00 00 17 00 00 00 23 00 00 00 3C 75 6E 6B
{40870} normal block at 0x0186C9B0, 12 bytes long.
Data: < G' º s> 08 47 92 00 01 00 00 00 BA 1F 04 73
{40827} normal block at 0x0186CC78, 128 bytes long.
Data: < ` s Load> 01 00 00 00 60 00 00 00 73 00 00 00 4C 6F 61 64
{40804} normal block at 0x0187D4E8, 64 bytes long.
Data: <´' d > B4 9F 92 00 01 00 00 00 01 00 00 00 64 00 00 00
There are really a lot of these.
On way I found to get also the file name shown where the memory leak
is caused, is here:
http://www.litwindow.com/Knowhow/wxHowto/wxhowto.html?gad=CM3uoJsBEgiAnrgx8GUksRjO6qv_AyDblvkH#debug_alloc
There's mentioned the following:
Include the following statements in your standard, precompiled headerfile:
#ifdef _DEBUG
#include <crtdbg.h>
#define DEBUG_NEW new(_NORMAL_BLOCK ,__FILE__, __LINE__)
#else
#define DEBUG_NEW new
#endif
My question: which header file to take so that it is "commonly"
included in all source files?
Because, the second statement in the thread given above, states:
In every CPP file, include these statements immediately after the last
#include statement (before the first malloc/new statement):
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
Hence, I should find a location where this DEBUG_NEW macro is made
available to all source files.
Any idea?
Best rgds,
--Geert
Follow ups