Here is a HowTo for locating memory holes in Singular:

0.) disable optimization and define flag OM_TRACK=5 :
     set
       CXXFLAGS=" -O0 -DOM_TRACK=5 "
         CFLAGS=" -O0 -DOM_TRACK=5 "
     explicitly, since configure option '--disable-optimizationflags' does not enable -O0

1.) configure Singular with options
     " --enable-debug --with-track-fl --with-track-backtrace "
     or similar (see available options from 'cd omalloc/ && ./configure --help )
2.) Use system("mtrack", [<level>, [<filename>]]) to get a report about
    unused memory, where
 * 0 <= level <= 5 determines how many stackframes per not freed
   address are printed (default is 5 -- 0 only prints a summary)
 * <filename> is name of file where report should be output to
   (defaults to stdout).
3.) Running 'regress.cmd -tt <level> file.tst' creates the file
    'file.mtrack.unused' with report of not freed addresses (<level> has
    same meaning as above).
4.) Within the C/C++ sources, Use 'omMarkAsStatic(addr)' to mark an
    address as static, i.e. as an address which is ok if it is not
    freed. Addresses marked this way are not reported by
    system("mtrack",...) (resp. regress.cmd -tt).
5.) For some more details, see also extra.cc: system("mtrack", ...)


