Changeset a36f9e8 in git
- Timestamp:
- Jul 28, 2009, 5:22:04 PM (14 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- 1305eacb0ae9e37f13cfc9e1a6df9828bff15c3b
- Parents:
- 4f673c00a1e6542d18d704394190f2ac7b88173f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/tesths.cc
r4f673c ra36f9e8 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: tesths.cc,v 1.11 7 2009-07-28 14:59:52Singular Exp $ */4 /* $Id: tesths.cc,v 1.118 2009-07-28 15:22:04 Singular Exp $ */ 5 5 6 6 /* … … 40 40 const char *singular_date=__DATE__ " " __TIME__; 41 41 42 #include <si_gmp.h> 43 44 int mmInit( void ); 45 int mmIsInitialized=mmInit(); 46 47 extern "C" 48 { 49 void omSingOutOfMemoryFunc() 50 { 51 fprintf(stderr, "\nerror: no more memory\n"); 52 omPrintStats(stderr); 53 m2_end(14); 54 /* should never get here */ 55 exit(1); 56 } 57 } 58 59 int mmInit( void ) 60 { 61 if(mmIsInitialized==0) 62 { 63 64 #ifndef LIBSINGULAR 65 #if defined(OMALLOC_USES_MALLOC) || defined(X_OMALLOC) 66 /* in mmstd.c, for some architectures freeSize() unconditionally uses the *system* free() */ 67 /* sage ticket 5344: http://trac.sagemath.org/sage_trac/ticket/5344 */ 68 /* solution: correctly check OMALLOC_USES_MALLOC from omalloc.h, */ 69 /* do not rely on the default in Singular as libsingular may be different */ 70 mp_set_memory_functions(omMallocFunc,omReallocSizeFunc,omFreeSizeFunc); 71 #else 72 mp_set_memory_functions(malloc,reallocSize,freeSize); 73 #endif 74 #endif // ifndef LIBSINGULAR 75 om_Opts.OutOfMemoryFunc = omSingOutOfMemoryFunc; 76 #ifndef OM_NDEBUG 77 om_Opts.ErrorHook = dErrorBreak; 78 #endif 79 omInitInfo(); 80 #ifdef OM_SING_KEEP 81 om_Opts.Keep = OM_SING_KEEP; 82 #endif 83 } 84 mmIsInitialized=1; 85 return 1; 86 } 87 42 88 #ifdef LIBSINGULAR 43 89 int siInit(char *name)
Note: See TracChangeset
for help on using the changeset viewer.