Changeset 43568c in git
- Timestamp:
- Sep 12, 2011, 2:49:35 PM (12 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- 6a4ba5f0fcf1059eaa59fa2244712afede164f3c
- Parents:
- d6039dfbb647e2775d91661b9541f7600bf05058
- git-author:
- Martin Lee <martinlee84@web.de>2011-09-12 14:49:35+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:12:43+01:00
- Location:
- factory
- Files:
-
- 12 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/NTLconvert.cc
rd6039d r43568c 41 41 #define Alloc(L) omAlloc(L) 42 42 #define Free(A,L) omFreeSize(A,L) 43 #elif defined(USE_MEMUTIL)44 #include "memutil.h"45 #define Alloc(L) getBlock(L)46 #define Free(A,L) freeBlock(A,L)47 43 #else 48 44 #define Alloc(L) malloc(L) -
factory/canonicalform.cc
rd6039d r43568c 17 17 #include "cf_binom.h" 18 18 19 #if defined (USE_MEMUTIL) && ! defined (USE_OLD_MEMMAN)20 #include "memman.h"21 #endif22 23 19 #include "cf_gmp.h" 24 20 … … 41 37 static bool initialized = false; 42 38 if ( ! initialized ) { 43 #if (defined (USE_MEMUTIL) && ! defined (USE_OLD_MEMMAN)) ||defined (SINGULAR)39 #if defined (SINGULAR) 44 40 (void)mmInit(); 45 41 #endif -
factory/configure.ac
rd6039d r43568c 43 43 44 44 45 AC_ARG_WITH(46 memman,47 [ --with-memman(=<memman>) specify Factory memory manager.48 <memman> is either \`old' (default), \`new', or \`no'.],49 ,50 [ if test "x$with_Singular" = xyes; then51 with_memman=no52 else53 with_memman=old54 fi ])55 56 45 # font-lock-trick: ' 57 46 … … 72 61 , 73 62 [enable_streamio=no]) 74 75 AC_ARG_ENABLE(76 memdebug,77 [ --enable-memdebug=<level> switch on memory management debugging. Meaningful78 with \`--with-memman=new' only. <level> may be either79 \`no' (default), \`normal', or \`full'.],80 ,81 enable_memdebug=no)82 63 83 64 AC_ARG_ENABLE( … … 279 260 factorysrc='$(basefactorysrc) $(singfactorysrc)' 280 261 factoryincl='$(basefactoryincl) $(singfactoryincl)' 281 memmansrc=282 memmanincl=283 262 284 263 alltargets=cf … … 290 269 factorysrc='$(basefactorysrc)' 291 270 factoryincl='$(basefactoryincl)' 292 memmansrc='$(basememmansrc)'293 memmanincl=294 271 295 272 alltargets=cf … … 383 360 if test "$with_omalloc" = yes; then 384 361 AC_DEFINE([HAVE_OMALLOC],[1],[HAVE_OMALLOC]) 385 with_memman=no386 362 fi 387 363 AC_MSG_RESULT($with_omalloc) … … 390 366 fi 391 367 392 393 # memory manager394 if test "x$with_memman" = xyes; then395 alltargets="$alltargets mem"396 installtargets="$installtargets installmem"397 uninstalltargets="$uninstalltargets uninstallmem"398 AC_DEFINE([USE_MEMUTIL],[1],[USE_MEMUTIL])399 400 if test "x$with_memman" != xnew; then401 memmansrc="$memmansrc \$(oldmemmansrc)"402 memmanincl='$(oldmemmanincl)'403 AC_DEFINE([USE_OLD_MEMMAN],[1],[USE_OLD_MEMMAN])404 else405 memmansrc="$memmansrc \$(newmemmansrc)"406 memmanincl='$(newmemmanincl)'407 408 if test "x$enable_memdebug" = xfull; then409 AC_DEFINE([MDEBUG], [1], [MDEBUG])410 elif test "x$enable_memdebug" != xno; then411 AC_DEFINE([MDEBUG], [0], [MDEBUG])412 fi413 fi414 fi415 368 416 369 # "configurable inline methods" … … 458 411 AC_SUBST(factorysrc) 459 412 AC_SUBST(factoryincl) 460 AC_SUBST(memmansrc)461 AC_SUBST(memmanincl)462 413 463 414 AC_SUBST(alltargets) -
factory/initgmp.cc
rd6039d r43568c 9 9 10 10 #include "cf_defs.h" 11 #ifdef USE_MEMUTIL12 #ifdef USE_OLD_MEMMAN13 #include "memutil.h"14 #else15 #include "memman.h"16 #endif17 #endif18 19 #ifdef USE_MEMUTIL20 #ifndef USE_OLD_MEMMAN21 #ifdef MDEBUG22 void * mgAllocBlock( size_t t)23 {24 return mmDBAllocBlock(t,"gmp",0);25 }26 void mgFreeBlock( void* a, size_t t)27 {28 mmDBFreeBlock(a,t,"gmp",0);29 }30 void * mgReallocBlock( void* a, size_t t1, size_t t2)31 {32 return mmDBReallocBlock(a,t1,t2,"gmp",0);33 }34 #endif35 #endif36 #endif37 11 38 12 int initializeGMP() -
factory/newdelete.cc
rd6039d r43568c 6 6 7 7 #include "cf_assert.h" 8 9 #ifdef USE_OLD_MEMMAN10 #include "memutil.h"11 #else12 #include "memman.h"13 #endif14 8 15 9 // The C++ standard has ratified a change to the new operator. … … 31 25 // Most operating systems will have slowed to be unusable 32 26 // long before the exception gets thrown. 33 34 #ifdef USE_OLD_MEMMAN35 36 void * operator new ( size_t size )37 {38 return getBlock( size );39 }40 41 void operator delete ( void * block )42 {43 freeBlock( block, 0 );44 }45 46 void * operator new[] ( size_t size )47 {48 return getBlock( size );49 }50 51 void operator delete[] ( void * block )52 {53 freeBlock( block, 0 );54 }55 56 void * operator new(size_t size, std::nothrow_t) throw()57 {58 return getBlock( size );59 }60 void * operator new[](size_t size, std::nothrow_t) throw()61 {62 return getBlock( size );63 }64 65 #else66 27 67 28 void * operator new ( size_t size ) … … 94 55 } 95 56 96 #endif /* USE_OLD_MEMMAN */
Note: See TracChangeset
for help on using the changeset viewer.