[Orxonox-commit 3740] r8420 - in code/trunk: bin src

rgrieder at orxonox.net rgrieder at orxonox.net
Sun May 8 19:51:57 CEST 2011


Author: rgrieder
Date: 2011-05-08 19:51:57 +0200 (Sun, 08 May 2011)
New Revision: 8420

Removed:
   code/trunk/bin/vld.ini.in
Modified:
   code/trunk/bin/CMakeLists.txt
   code/trunk/src/CMakeLists.txt
Log:
MSVC: use the user's vld.ini file for the Visual Leak Detector.

Modified: code/trunk/bin/CMakeLists.txt
===================================================================
--- code/trunk/bin/CMakeLists.txt	2011-05-08 17:19:32 UTC (rev 8419)
+++ code/trunk/bin/CMakeLists.txt	2011-05-08 17:51:57 UTC (rev 8420)
@@ -32,10 +32,6 @@
     LIST(APPEND RUN_SCRIPTS ${_script}.bat)
   ENDFOREACH(_script)
 ENDIF()
-# Also copy vld.ini (visual leak detector config) for MSVC
-IF(MSVC)
-  LIST(APPEND RUN_SCRIPTS vld.ini)
-ENDIF()
 
 IF(NOT CMAKE_CONFIGURATION_TYPES)
   SET(_subdirs .)

Deleted: code/trunk/bin/vld.ini.in
===================================================================
--- code/trunk/bin/vld.ini.in	2011-05-08 17:19:32 UTC (rev 8419)
+++ code/trunk/bin/vld.ini.in	2011-05-08 17:51:57 UTC (rev 8420)
@@ -1,155 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;  Visual Leak Detector - Initialization/Configuration File
-;;  Copyright (c) 2006 Dan Moulding
-;;
-;;  This library is free software; you can redistribute it and/or
-;;  modify it under the terms of the GNU Lesser General Public
-;;  License as published by the Free Software Foundation; either
-;;  version 2.1 of the License, or (at your option) any later version.
-;;
-;;  This library is distributed in the hope that it will be useful,
-;;  but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;;  Lesser General Public License for more details.
-;;
-;;  You should have received a copy of the GNU Lesser General Public
-;;  License along with this library; if not, write to the Free Software
-;;  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-;;
-;;  See COPYING.txt for the full terms of the GNU Lesser General Public License.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-; Any options left blank or not present will revert to their default values.
-[Options]
-
-; The main on/off switch. If off, Visual Leak Detector will be completely
-; disabled. It will do nothing but print a message to the debugger indicating
-; that it has been turned off.
-;
-;  Valid Values: on, off
-;  Default: on
-;
-VLD = @VISUAL_LEAK_DETECTOR_ENABLE@ 
-
-; If yes, duplicate leaks (those that are identical) are not shown individually.
-; Only the first such leak is shown, along with a number indicating the total
-; number of duplicate leaks.
-;
-;   Valid Values: yes, no
-;   Default: no
-;
-AggregateDuplicates = yes
-
-; Lists any additional modules to be included in memory leak detection. This can
-; be useful for checking for memory leaks in debug builds of 3rd party modules
-; which can not be easily rebuilt with '#include "vld.h"'. This option should be
-; used only if absolutely necessary and only if you really know what you are
-; doing.
-;
-;   CAUTION: Avoid listing any modules that link with the release CRT libraries.
-;     Only modules that link with the debug CRT libraries should be listed here.
-;     Doing otherwise might result in false memory leak reports or even crashes.
-;
-;   Valid Values: Any list containing module names (i.e. names of EXEs or DLLs).
-;   Default: None.
-;
-ForceIncludeModules = boost_date_time-vc90-mt-gd-1_44.dll, boost_filesystem-vc90-mt-gd-1_44.dll, boost_system-vc90-mt-gd-1_44.dll, boost_thread-vc90-mt-gd-1_44.dll, lua_d.dll, ogg_d.dll, vorbis_d.dll, vorbifile_d.dll
-
-; Maximum number of data bytes to display for each leaked block. If zero, then
-; the data dump is completely suppressed and only call stacks are shown.
-; Limiting this to a low number can be useful if any of the leaked blocks are
-; very large and cause unnecessary clutter in the memory leak report.
-;
-;   Value Values: 0 - 4294967295
-;   Default: 4294967295
-;
-MaxDataDump = 0
-
-; Maximum number of call stack frames to trace back during leak detection.
-; Limiting this to a low number can reduce the CPU utilization overhead imposed
-; by memory leak detection, especially when using the slower "safe" stack
-; walking method (see StackWalkMethod below).
-;
-;   Valid Values: 1 - 4294967295
-;   Default: 4294967295
-;
-MaxTraceFrames = 
-
-; Sets the type of encoding to use for the generated memory leak report. This
-; option is really only useful in conjuction with sending the report to a file.
-; Sending a Unicode encoded report to the debugger is not useful because the
-; debugger cannot display Unicode characters. Using Unicode encoding might be
-; useful if the data contained in leaked blocks is likely to consist of Unicode
-; text.
-;
-;   Valid Values: ascii, unicode
-;   Default: ascii
-;
-ReportEncoding = ascii
-
-; Sets the report file destination, if reporting to file is enabled. A relative
-; path may be specified and is considered relative to the process' working
-; directory.
-;
-;   Valid Values: Any valid path and filename.
-;   Default: .\memory_leak_report.txt
-;
-ReportFile = 
-
-; Sets the report destination to either a file, the debugger, or both. If
-; reporting to file is enabled, the report is sent to the file specified by the
-; ReportFile option.
-;
-;   Valid Values: debugger, file, both
-;   Default: debugger
-;
-ReportTo = debugger
-
-; Turns on or off a self-test mode which is used to verify that VLD is able to
-; detect memory leaks in itself. Intended to be used for debugging VLD itself,
-; not for debugging other programs.
-;
-;   Valid Values: on, off
-;   Default: off
-;
-SelfTest = off
-
-; Selects the method to be used for walking the stack to obtain stack traces for
-; allocated memory blocks. The "fast" method may not always be able to
-; successfully trace completely through all call stacks. In such cases, the
-; "safe" method may prove to more reliably obtain the full stack trace. The
-; disadvantage is that the "safe" method is significantly slower than the "fast"
-; method and will probably result in very noticeable performance degradation of
-; the program being debugged.
-;
-;   Valid Values: fast, safe
-;   Default: fast
-; 
-StackWalkMethod = fast
-
-; Determines whether memory leak detection should be initially enabled for all
-; threads, or whether it should be initially disabled for all threads. If set
-; to "yes", then any threads requiring memory leak detection to be enabled will
-; need to call VLDEnable at some point to enable leak detection for those
-; threads.
-;
-;   Valid Values: yes, no
-;   Default: no
-;
-StartDisabled = no
-
-; Determines whether or not all frames, including frames internal to the heap,
-; are traced. There will always be a number of frames internal to Visual Leak
-; Detector and C/C++ or Win32 heap APIs that aren't generally useful for
-; determining the cause of a leak. Normally these frames are skipped during the
-; stack trace, which somewhat reduces the time spent tracing and amount of data
-; collected and stored in memory. Including all frames in the stack trace, all
-; the way down into VLD's own code can, however, be useful for debugging VLD
-; itself.
-;
-;   Valid Values: yes, no
-;   Default: no
-;
-TraceInternalFrames = no

Modified: code/trunk/src/CMakeLists.txt
===================================================================
--- code/trunk/src/CMakeLists.txt	2011-05-08 17:19:32 UTC (rev 8419)
+++ code/trunk/src/CMakeLists.txt	2011-05-08 17:51:57 UTC (rev 8420)
@@ -65,6 +65,10 @@
       REMOVE_LINKER_FLAGS("-INCREMENTAL:YES" Debug)
       ADD_LINKER_FLAGS   ("-INCREMENTAL:NO"  Debug)
     ENDIF()
+    IF(NOT DISABLE_COMPILATIONS)
+      # Compilations seem to generate 'memory leaks' with static variables
+      MESSAGE("Warning: You should disable Compilations when using VLD!")
+    ENDIF()
   ENDIF()
 ENDIF()
 




More information about the Orxonox-commit mailing list