fieker-DuValspielwiese
Last change
on this file since 584b82 was
75f460,
checked in by Hans Schoenemann <hannes@…>, 9 years ago
|
format
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Rev | Line | |
---|
[c31461] | 1 | Here is a HowTo for locating memory holes in Singular: |
---|
| 2 | |
---|
| 3 | 0.) disable optimization and define flag OM_TRACK=5 : |
---|
[75f460] | 4 | set |
---|
| 5 | CXXFLAGS=" -O0 -DOM_TRACK=5 " |
---|
| 6 | CFLAGS=" -O0 -DOM_TRACK=5 " |
---|
[c31461] | 7 | explicitly, since configure option '--disable-optimizationflags' does not enable -O0 |
---|
| 8 | |
---|
[75f460] | 9 | 1.) configure Singular with options |
---|
| 10 | " --enable-debug --with-track-fl --with-track-backtrace " |
---|
[c31461] | 11 | or similar (see available options from 'cd omalloc/ && ./configure --help ) |
---|
[718add] | 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). |
---|
[18e9f2f] | 18 | 3.) Running 'regress.cmd -tt <level> file.tst' creates the file |
---|
[75f460] | 19 | 'file.mtrack.unused' with report of not freed addresses (<level> has |
---|
[718add] | 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.