Changeset 118d806 in git for libpolys


Ignore:
Timestamp:
Feb 28, 2014, 10:40:33 AM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
2b7e8f06b94cb0127d7069aa1c20e2354dfd4d0c
Parents:
4fb7e4696a23eaae42105748d89bafdcb0fbe963
Message:
removed S_ROOT_DIR,S_UNAME from libpolys/misc/auxiliary.h.in

S_ROOT_DIR is not used any more,
S_UNAME is now set in singularconfig.h
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/misc/auxiliary.h.in

    r4fb7e4 r118d806  
    11/*****************************************************************************\
    2  * Computer Algebra System SINGULAR   
     2 * Computer Algebra System SINGULAR
    33\*****************************************************************************/
    44/** @file auxiliary.h
    5  * 
     5 *
    66 * All the auxiliary stuff.
    77 *
     
    6666#endif
    6767
    68 #endif 
     68#endif
    6969// #ifdef HAVE_FACTORY
    7070
    7171// ----------------  end of parts/extensions
    72 // -----------------  configure stuff
    73 
    74 // TODO: the following should go to some config.h... no?
    75 
    76 /* Absolute pathname of root directory of Singular source */
    77 #ifndef S_ROOT_DIR
    78 #define S_ROOT_DIR ""
    79 #endif
    80 
    81 /* Singular\'s own uname\ */
    82 #ifndef S_UNAME
    83 #define S_UNAME ""
    84 #endif
    85 // ----------------- end of configure stuff
    8672
    8773// ---------------- Singular standard types etc.
     
    221207       ...
    222208
    223        makes sure that all poly operations in your file are done with 
     209       makes sure that all poly operations in your file are done with
    224210       PDEBUG == 2
    225211 To break after an error occured, set a debugger breakpoint on
    226  dErrorBreak. 
     212 dErrorBreak.
    227213*/
    228214#ifndef PDEBUG
     
    258244     1     : addresses are only marked as free and not really freed.
    259245
    260    OM_CHECK, OM_TRACK, and OM_KEEP can be set on a per-file basis 
     246   OM_CHECK, OM_TRACK, and OM_KEEP can be set on a per-file basis
    261247   (as can OM_NDEBUG),  e.g.:
    262248     #define OM_CHECK 3
     
    265251     #include <kernel/mod2.h>
    266252     #include <omalloc/omalloc.h>
    267    ensures that all memory allocs/free in this file are done with 
    268    OM_CHECK==3 and OM_TRACK==5, and that all addresses allocated/freed 
     253   ensures that all memory allocs/free in this file are done with
     254   OM_CHECK==3 and OM_TRACK==5, and that all addresses allocated/freed
    269255   in this file are only marked as free and never really freed.
    270  
    271    To set OM_CHECK, OM_TRACK and OM_KEEP under dynamic scope, set 
    272    om_Opts.MinCheck, om_Opts.MinTrack to the respectiv values and 
    273    om_Opts.Keep to the number of addresses which are kept before they are 
     256
     257   To set OM_CHECK, OM_TRACK and OM_KEEP under dynamic scope, set
     258   om_Opts.MinCheck, om_Opts.MinTrack to the respectiv values and
     259   om_Opts.Keep to the number of addresses which are kept before they are
    274260   actually freed. E.g.:
    275261     int check=om_Opts.MinCheck, track=om_Opts.MinTrack, keep= m_OPts.Keep;
     
    278264     om_Opts.MinCheck = check; omOpts.MinTrack = track; omOpts.Keep = keep;
    279265   ensures that all calls omDebug routines  occuring during the computation of
    280    ExternalRoutine() are done with OM_CHECK==3 and OM_TRACK==5, and 
     266   ExternalRoutine() are done with OM_CHECK==3 and OM_TRACK==5, and
    281267   calls to omFree only mark addresses as free and not really free them.
    282268
    283    Furthermore, the value of OM_SING_KEEP (resp. om_Opts.Keep) specifies 
    284    how many addresses are kept before they are actually freed, independently 
     269   Furthermore, the value of OM_SING_KEEP (resp. om_Opts.Keep) specifies
     270   how many addresses are kept before they are actually freed, independently
    285271   of the value of OM_KEEP.
    286272
     
    295281     Under dynamic scope, do (e.g., from within the debugger):
    296282       om_Opts.MinCheck = 3; om_Opts.MinTrack = 5; omOpts.Keep = LONG_MAX;
    297    + to find out where "memory corruption" occured, increase value of 
    298      OM_CHECK - the higher this value is, the more consistency checks are 
    299      done (However a value > 3 checks the entire memory each time an omalloc 
     283   + to find out where "memory corruption" occured, increase value of
     284     OM_CHECK - the higher this value is, the more consistency checks are
     285     done (However a value > 3 checks the entire memory each time an omalloc
    300286     routine is used!)
    301    
     287
    302288   Some more tips on the usage of omalloc:
    303    + omAlloc*, omRealloc*, omFree*, omCheck* omDebug* omTest* rotuines 
     289   + omAlloc*, omRealloc*, omFree*, omCheck* omDebug* omTest* rotuines
    304290     assume that sizes are > 0 and pointers are != NULL
    305291   + omalloc*, omrealloc*, omfree* omcheck*, omdebug* omtest* routines allow
    306292     NULL pointers and sizes == 0
    307    + You can safely use any free/realloc routine in combination with any alloc 
     293   + You can safely use any free/realloc routine in combination with any alloc
    308294     routine (including the debug versions): E.g., an address allocated with
    309      omAllocBin can be freed with omfree, or an adress allocated with 
     295     omAllocBin can be freed with omfree, or an adress allocated with
    310296     om(Debug)Alloc can be freed with omfree, or omFree, or omFreeSize, etc.
    311      However, keep in mind that the efficiency decreases from 
     297     However, keep in mind that the efficiency decreases from
    312298     Bin over Size to General routines (i.e., omFreeBin is more efficient than
    313299     omFreeSize which is more efficient than omFree, likewise with the alloc
    314300     routines).
    315301   + if OM_CHECK is undefined or 0, then all omCheck routines do nothing
    316    + if OM_CHECK and OM_TRACK are both undefined (or 0), or if OM_NDEBUG is 
    317      defined, then the "real" alloc/realloc/free macros are used, and all 
     302   + if OM_CHECK and OM_TRACK are both undefined (or 0), or if OM_NDEBUG is
     303     defined, then the "real" alloc/realloc/free macros are used, and all
    318304     omTest, omDebug and omCheck routines are undefined
    319    + to break after an omError occured within a debugger, 
     305   + to break after an omError occured within a debugger,
    320306     set a breakpoint on dErrorBreak
    321    + to do checks from within the debugger, or to do checks with explicit 
     307   + to do checks from within the debugger, or to do checks with explicit
    322308     check level, use omTest routines.
    323309*/
     
    331317#define OM_CHECK 1
    332318#endif
    333 /* Do actually free memory: 
    334    (be careful: if this is set, memory is never really freed, 
     319/* Do actually free memory:
     320   (be careful: if this is set, memory is never really freed,
    335321    but only marked as free) */
    336322#ifndef OM_KEEP
    337323#define OM_KEEP 0
    338324#endif
    339 /* but only after you have freed 1000 more addresses 
     325/* but only after you have freed 1000 more addresses
    340326   (this is actually independent of the value of OM_KEEP and used
    341327   to initialize om_Opts.Keep) */
     
    347333
    348334
    349 /* undef KDEBUG for check of data during std computations 
     335/* undef KDEBUG for check of data during std computations
    350336 *
    351337 * define KDEBUG to
    352338 * 0 for basic tests
    353  * 1 for tests in kSpoly 
    354  * NOTE: You can locally enable tests in kspoly by setting the 
     339 * 1 for tests in kSpoly
     340 * NOTE: You can locally enable tests in kspoly by setting the
    355341 *       define at the beginning of kspoly.cc
    356342 */
     
    369355#define YYDEBUG 1
    370356
    371 #endif 
     357#endif
    372358/* end of debugging option (ifndef SING_NDEBUG) */
    373359
     
    457443
    458444
    459 #endif 
     445#endif
    460446/* MISC_AUXILIARY_H */
    461447
Note: See TracChangeset for help on using the changeset viewer.