spielwiese
Last change
on this file since c31461 was
c31461,
checked in by Jakob Kröker <kroeker@…>, 10 years ago
|
update FindMemoryHoles howto
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | Here is a HowTo for locating memory holes in Singular: |
---|
2 | |
---|
3 | 0.) 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 | |
---|
9 | 1.) configure Singular with options |
---|
10 | " --enable-debug --with-track-fl --with-track-backtrace " |
---|
11 | or similar (see available options from 'cd omalloc/ && ./configure --help ) |
---|
12 | 2.) 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). |
---|
18 | 3.) 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). |
---|
21 | 4.) 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). |
---|
25 | 5.) For some more details, see also extra.cc: system("mtrack", ...) |
---|
26 | |
---|
27 | |
---|
Note: See
TracBrowser
for help on using the repository browser.