Changeset a53ae5 in git
- Timestamp:
- Oct 26, 2010, 1:30:57 PM (14 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
- Children:
- 9fb928acbc894e6a14185499aa5c1b742dd13cd8
- Parents:
- 7ec061457a32276f5631a769c22351460d82ff0e
- Location:
- Singular
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/extra.cc
r7ec0614 ra53ae5 2322 2322 else 2323 2323 #endif 2324 2325 #if !defined(OM_NDEBUG) 2324 2326 /*==================== omMemoryTest ==================================*/ 2325 if (strcmp(sys_cmd,"omMemoryTest")==0) 2326 { 2327 2328 #if !defined(OM_NDEBUG) 2327 if (strcmp(sys_cmd,"omMemoryTest")==0) 2328 { 2329 2329 2330 2330 #ifdef OM_STATS_H 2331 2332 2331 PrintS("\n[om_Info]: \n"); 2332 omUpdateInfo(); 2333 2333 #define OM_PRINT(name) Print(" %-22s : %10ld \n", #name, om_Info . name) 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2334 OM_PRINT(MaxBytesSystem); 2335 OM_PRINT(CurrentBytesSystem); 2336 OM_PRINT(MaxBytesSbrk); 2337 OM_PRINT(CurrentBytesSbrk); 2338 OM_PRINT(MaxBytesMmap); 2339 OM_PRINT(CurrentBytesMmap); 2340 OM_PRINT(UsedBytes); 2341 OM_PRINT(AvailBytes); 2342 OM_PRINT(UsedBytesMalloc); 2343 OM_PRINT(AvailBytesMalloc); 2344 OM_PRINT(MaxBytesFromMalloc); 2345 OM_PRINT(CurrentBytesFromMalloc); 2346 OM_PRINT(MaxBytesFromValloc); 2347 OM_PRINT(CurrentBytesFromValloc); 2348 OM_PRINT(UsedBytesFromValloc); 2349 OM_PRINT(AvailBytesFromValloc); 2350 OM_PRINT(MaxPages); 2351 OM_PRINT(UsedPages); 2352 OM_PRINT(AvailPages); 2353 OM_PRINT(MaxRegionsAlloc); 2354 OM_PRINT(CurrentRegionsAlloc); 2355 2355 #undef OM_PRINT 2356 2356 #endif 2357 2357 2358 2358 #ifdef OM_OPTS_H 2359 2359 PrintS("\n[om_Opts]: \n"); 2360 2360 #define OM_PRINT(format, name) Print(" %-22s : %10" format"\n", #name, om_Opts . name) 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2361 OM_PRINT("d", MinTrack); 2362 OM_PRINT("d", MinCheck); 2363 OM_PRINT("d", MaxTrack); 2364 OM_PRINT("d", MaxCheck); 2365 OM_PRINT("d", Keep); 2366 OM_PRINT("d", HowToReportErrors); 2367 OM_PRINT("d", MarkAsStatic); 2368 OM_PRINT("u", PagesPerRegion); 2369 OM_PRINT("p", OutOfMemoryFunc); 2370 OM_PRINT("p", MemoryLowFunc); 2371 OM_PRINT("p", ErrorHook); 2372 2372 #undef OM_PRINT 2373 2373 #endif 2374 2374 2375 2376 2377 2375 #ifdef OM_ERROR_H 2378 2376 Print("\n\n[om_ErrorStatus] : '%s' (%s)\n", 2379 2377 omError2String(om_ErrorStatus), 2380 2378 omError2Serror(om_ErrorStatus)); 2381 2379 Print("[om_InternalErrorStatus]: '%s' (%s)\n", 2382 2380 omError2String(om_InternalErrorStatus), 2383 2381 omError2Serror(om_InternalErrorStatus)); 2384 2382 2385 // PrintS("Trying to check the omalloc memory system: ");2386 {2387 omError_t ret = _omDebugMemory(10, OM_FL);2388 Print("[omDebugMemory()] : '%s' (%s)\n", omError2String(ret), omError2Serror(ret));2389 }2390 #endif2391 2383 #endif 2392 2384 2393 2385 // omTestMemory(1); 2394 2386 // omtTestErrors(); 2395 return FALSE; 2396 } 2397 else 2387 return FALSE; 2388 } 2389 else 2390 #endif 2398 2391 /*==================== naIdeal ==================================*/ 2399 2392 if(strcmp(sys_cmd,"naIdeal")==0) -
Singular/iparith.cc
r7ec0614 ra53ae5 69 69 #include <Singular/ipshell.h> 70 70 #include <kernel/mpr_inout.h> 71 72 #ifdef HAVE_FANS 71 73 #include <gfanlib/gfanlib.h> 74 #endif 72 75 73 76 #include <kernel/timer.h> -
Singular/ipid.cc
r7ec0614 ra53ae5 29 29 #include <kernel/syz.h> 30 30 #include <Singular/ipid.h> 31 32 #ifdef HAVE_FANS 31 33 #include <gfanlib/gfanlib.h> 34 #endif 32 35 33 36 #ifdef HAVE_DYNAMIC_LOADING … … 226 229 } 227 230 228 //#define KAI 229 idhdl enterid(const char * s, int lev, int t, idhdl* root, BOOLEAN init) 231 idhdl enterid(const char * s, int lev, int t, idhdl* root, BOOLEAN init, BOOLEAN search) 230 232 { 231 233 idhdl h; … … 252 254 } 253 255 } 254 // is it already defined in idroot ?255 else if (*root != IDROOT)256 {257 if ((h=IDROOT->get(s,lev))!=NULL)258 {259 if (IDLEV(h)==lev)260 {261 if ((IDTYP(h) == t)||(t==DEF_CMD))262 {263 if (BVERBOSE(V_REDEFINE))264 Warn("redefining %s **",s);265 if (s==IDID(h)) IDID(h)=NULL;266 killhdl2(h,&IDROOT,NULL);267 }268 else269 goto errlabel;270 }271 }272 }273 256 // is it already defined in currRing->idroot ? 274 else if ( (currRing!=NULL)&&((*root) != currRing->idroot))257 else if (search && (currRing!=NULL)&&((*root) != currRing->idroot)) 275 258 { 276 259 if ((h=currRing->idroot->get(s,lev))!=NULL) … … 290 273 } 291 274 } 275 // is it already defined in idroot ? 276 else if (search && (*root != IDROOT)) 277 { 278 if ((h=IDROOT->get(s,lev))!=NULL) 279 { 280 if (IDLEV(h)==lev) 281 { 282 if ((IDTYP(h) == t)||(t==DEF_CMD)) 283 { 284 if (BVERBOSE(V_REDEFINE)) 285 Warn("redefining `%s` **",s); 286 if (s==IDID(h)) IDID(h)=NULL; 287 killhdl2(h,&IDROOT,NULL); 288 } 289 else 290 goto errlabel; 291 } 292 } 293 } 292 294 *root = (*root)->set(s, lev, t, init); 293 295 #ifndef NDEBUG … … 303 305 return NULL; 304 306 } 305 306 307 void killid(const char * id, idhdl * ih) 307 308 { … … 502 503 // general ------------------------------------------------------------- 503 504 // now dechain it and delete idrec 504 #ifdef KAI505 if(h->next != NULL)506 Print("=======>%s(%x) -> %s<====\n", IDID(h), IDID(h), IDID(h->next));507 else508 Print("=======>%s(%x)<====\n", IDID(h), IDID(h));509 #endif510 511 505 if (IDID(h)!=NULL) // OB: ????? 512 506 omFree((ADDRESS)IDID(h)); … … 825 819 return NULL; 826 820 } 821 >>>>>>> .r13569 -
Singular/ipid.h
r7ec0614 ra53ae5 84 84 char *idhdl2id(idhdl pck, idhdl h); 85 85 void iiname2hdl(const char *name, idhdl *pck, idhdl *id); 86 idhdl enterid(const char * a, int lev, int t, idhdl* root, BOOLEAN init=TRUE );86 idhdl enterid(const char * a, int lev, int t, idhdl* root, BOOLEAN init=TRUE, BOOLEAN serach=TRUE); 87 87 idhdl ggetid(const char *n); 88 88 idhdl ggetid(const char *n, BOOLEAN local, idhdl *packhdl); -
Singular/libparse.cc
r7ec0614 ra53ae5 1624 1624 { 1625 1625 h0 = enterid( proc, 0 /*myynest*/, PROC_CMD, 1626 &(IDPACKAGE(pl)->idroot), TRUE );1626 &(IDPACKAGE(pl)->idroot), TRUE, !p_static); 1627 1627 if (h0==NULL) return(1); 1628 1628 if((!p_static) && autoexport) -
Singular/libparse.l
r7ec0614 ra53ae5 323 323 { 324 324 h0 = enterid( proc, 0 /*myynest*/, PROC_CMD, 325 &(IDPACKAGE(pl)->idroot), TRUE );325 &(IDPACKAGE(pl)->idroot), TRUE, !p_static); 326 326 if (h0==NULL) return(1); 327 327 if((!p_static) && autoexport)
Note: See TracChangeset
for help on using the changeset viewer.