warzone2100/lib/framework
Buginator 584c4f1aee Add new routines for MSVC that allows us to toggle the allocation tracking.
Currently, it is only used in debug builds for strdup().
For release builds, we use _strdup().

This was necessary to prevent reporting of tons of 'memory leaks' caused by strdup(). Mostly caused by all the parsers lack of cleaning up after themselves.

Sample of what it does is shown.  When we don't toggle the allocator, then it is added to the Normal Blocks.  If we do toggle the allocator, then it is added to the CRT Blocks.
0 bytes in 0 Free Blocks means no memory leaks (for this quick loading of a SP mission--we still have LOTS of other leaks!)
I believe you can figure out what the rest of the stats mean.


0 bytes in 0 Free Blocks.
913860 bytes in 1826 Normal Blocks.
18745 bytes in 139 CRT Blocks.
0 bytes in 0 Ignore Blocks.
0 bytes in 0 Client Blocks.
Largest number used: 13564181 bytes.
Total allocations: 283917669 bytes.

2.3: r10250

refs ticket:1673


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10261 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-14 09:21:16 +01:00
..
Makefile.am As was discussed on the ML, removing SQL from trunk. 2009-11-22 16:19:50 +01:00
SDL_framerate.c Basic buildfile support for ICC and silence one warning. 2007-10-02 21:43:43 +00:00
SDL_framerate.h Try to clean up includes, fix missing extern on declaration of DataHash[]. 2010-03-10 13:31:27 +01:00
config-macosx.h Fix compilation of SQLite under OS X. Stats are still broken. 2009-03-01 13:06:59 +00:00
configfile.c Use bigger buffers in registry_load, to avoid stack overflow if a key is longer than 31 bytes. 2010-03-04 19:07:38 +01:00
configfile.h cpp: Add extern "C" {} in headers. 2010-02-09 20:27:21 +01:00
cursors.c Use 32x32 cursors if unknown cursor type given. 2010-01-30 20:26:44 +01:00
cursors.h Try to clean up includes, fix missing extern on declaration of DataHash[]. 2010-03-10 13:31:27 +01:00
cursors16.c Please use setDroidActionTarget() whenever you change psActionTarget. This helps set dangling pointer debugging information. 2009-05-06 22:29:32 +02:00
cursors32.c Please use setDroidActionTarget() whenever you change psActionTarget. This helps set dangling pointer debugging information. 2009-05-06 22:29:32 +02:00
debug.c Add new routines for MSVC that allows us to toggle the allocation tracking. 2010-03-14 09:21:16 +01:00
debug.h Add new routines for MSVC that allows us to toggle the allocation tracking. 2010-03-14 09:21:16 +01:00
endian_hack.h cpp: Add extern "C" {} in headers. 2010-02-09 20:27:21 +01:00
file.h Replace ''all'' usage of BOOL in lib/framework with bool instead 2010-02-15 20:51:08 +01:00
fixedpoint.h Changing object rotations to use 16 bit unsigned values instead of the current 2010-03-04 19:07:37 +01:00
frame.c Replace ''all'' usage of BOOL in lib/framework with bool instead 2010-02-15 20:51:08 +01:00
frame.h Replace ''all'' usage of BOOL in lib/framework with bool instead 2010-02-15 20:51:08 +01:00
frameint.h Replace ''all'' usage of BOOL in lib/framework with bool instead 2010-02-15 20:51:08 +01:00
frameresource.c Replace ''all'' usage of BOOL in lib/framework with bool instead 2010-02-15 20:51:08 +01:00
frameresource.h Replace ''all'' usage of BOOL in lib/framework with bool instead 2010-02-15 20:51:08 +01:00
framework.vcproj As was discussed on the ML, removing SQL from trunk. 2009-11-22 16:19:50 +01:00
gettext.h Port r3878 and r3879 from trunk/ 2008-03-01 13:04:16 +00:00
i18n.c Step 1 of X in getting translations working on the mac. 2010-02-16 23:50:09 +01:00
i18n.h Replace some BOOL usage with bool 2010-02-15 20:51:07 +01:00
input.c Try to clean up includes, fix missing extern on declaration of DataHash[]. 2010-03-10 13:31:27 +01:00
input.h Try to clean up includes, fix missing extern on declaration of DataHash[]. 2010-03-10 13:31:27 +01:00
lexer_input.c Make it possible for the lexers to use data from an STDIO FILE* stream 2009-04-18 15:37:53 +02:00
lexer_input.h cpp: Add extern "C" {} in headers. 2010-02-09 20:27:21 +01:00
listmacs.h Try to clean up includes, fix missing extern on declaration of DataHash[]. 2010-03-10 13:31:27 +01:00
macros.h logical: Use separate pseudorandom number generator for game decisions, which should at some point be made to be synchronised between clients. 2010-02-09 20:28:09 +01:00
makefile.win32 - NSIS changes from 2.3 (#1111). 2010-02-09 20:28:16 +01:00
math_ext.h Random minor cleanup. 2010-03-06 23:02:36 +01:00
physfs_ext.h cpp: Add extern "C" {} in headers. 2010-02-09 20:27:21 +01:00
resly.h cpp: Add extern "C" {} in headers. 2010-02-09 20:27:21 +01:00
resource_lexer.l Return 0 in the various _lex_destroy int functions. 2010-02-20 00:50:15 +01:00
resource_parser.y As was discussed on the ML, removing SQL from trunk. 2009-11-22 16:19:50 +01:00
stdio_ext.c Add a new debug flag type, LOG_FATAL. 2009-11-22 16:19:51 +01:00
stdio_ext.h Change SDL types to stdint.h defined types. Do not depend on SDL.h included system headers. 2009-05-06 22:29:30 +02:00
string_ext.h Add new routines for MSVC that allows us to toggle the allocation tracking. 2010-03-14 09:21:16 +01:00
strres.c Replace ''all'' usage of BOOL in lib/framework with bool instead 2010-02-15 20:51:08 +01:00
strres.h Replace ''all'' usage of BOOL in lib/framework with bool instead 2010-02-15 20:51:08 +01:00
strres_lexer.l Return 0 in the various _lex_destroy int functions. 2010-02-20 00:50:15 +01:00
strres_parser.y Bump copyright 2009-02-10 18:01:48 +00:00
strresly.h Replace ''all'' usage of BOOL in lib/framework with bool instead 2010-02-15 20:51:08 +01:00
tagfile.c Add a new debug flag type, LOG_FATAL. 2009-11-22 16:19:51 +01:00
tagfile.h cpp: Add extern "C" {} in headers. 2010-02-09 20:27:21 +01:00
treap.c Replace ''all'' usage of BOOL in lib/framework with bool instead 2010-02-15 20:51:08 +01:00
treap.h Replace ''all'' usage of BOOL in lib/framework with bool instead 2010-02-15 20:51:08 +01:00
trig.c Try to clean up includes, fix missing extern on declaration of DataHash[]. 2010-03-10 13:31:27 +01:00
trig.h Replace trig usage with iSin/iCos, etc... Replace dirtyHypot with clean iHypot. Replace MIN(MAX()) with clip(). 2010-03-05 14:43:37 +01:00
types.h Try to fix new build warnings and a build error on mac. 2010-03-10 22:55:24 +01:00
utf.c Apply patch #1330 provided by Cyp - Add unicode support to text boxes and game-chat 2010-02-09 20:04:29 +01:00
utf.h cpp: Add extern "C" {} in headers. 2010-02-09 20:27:21 +01:00
vector.h Replace trig usage with iSin/iCos, etc... Replace dirtyHypot with clean iHypot. Replace MIN(MAX()) with clip(). 2010-03-05 14:43:37 +01:00
wzglobal.h Fix building on mac (should really work this time). Maybe fix building on windows, maybe not, no idea if it was the same issue. 2010-03-11 09:42:38 +01:00