source: git/Singular/HOWTO.FindMemoryHoles @ 8d1432e

spielwiese
Last change on this file since 8d1432e was 75f460, checked in by Hans Schoenemann <hannes@…>, 9 years ago
format
  • Property mode set to 100644
File size: 1.2 KB
Line 
1Here is a HowTo for locating memory holes in Singular:
2
30.) disable optimization and define flag OM_TRACK=5 :
4     set
5       CXXFLAGS=" -O0 -DOM_TRACK=5 "
6         CFLAGS=" -O0 -DOM_TRACK=5 "
7     explicitly, since configure option '--disable-optimizationflags' does not enable -O0
8
91.) configure Singular with options
10     " --enable-debug --with-track-fl --with-track-backtrace "
11     or similar (see available options from 'cd omalloc/ && ./configure --help )
122.) Use system("mtrack", [<level>, [<filename>]]) to get a report about
13    unused memory, where
14 * 0 <= level <= 5 determines how many stackframes per not freed
15   address are printed (default is 5 -- 0 only prints a summary)
16 * <filename> is name of file where report should be output to
17   (defaults to stdout).
183.) Running 'regress.cmd -tt <level> file.tst' creates the file
19    'file.mtrack.unused' with report of not freed addresses (<level> has
20    same meaning as above).
214.) Within the C/C++ sources, Use 'omMarkAsStatic(addr)' to mark an
22    address as static, i.e. as an address which is ok if it is not
23    freed. Addresses marked this way are not reported by
24    system("mtrack",...) (resp. regress.cmd -tt).
255.) For some more details, see also extra.cc: system("mtrack", ...)
26
27
Note: See TracBrowser for help on using the repository browser.