Changeset dc50ee in git
- Timestamp:
- Apr 9, 2015, 1:54:30 PM (8 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- 8024837072c7be2a09fc786de78354ac60cb89c6
- Parents:
- 5406093341f3303d862a426a868f865e391fc180
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2015-04-09 13:54:30+02:00
- git-committer:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2015-04-09 15:05:06+02:00
- Files:
-
- 7 edited
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
Singular/Makefile.am
r540609 rdc50ee 158 158 bin_PROGRAMS = Singular ESingular TSingular $(optional_Singular_programs) 159 159 160 Singular_SOURCES = tesths.cc mmalloc.ccfegetopt.c fegetopt.h utils.cc utils.h160 Singular_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc utils.h 161 161 162 162 Singular_LDADD = libSingular.la ${BUILTIN_FLAGS} … … 164 164 Singular_LDFLAGS = -static ${AM_LDFLAGS} ${BUILTIN_FLAGS} 165 165 166 Singulard_SOURCES = tesths.cc mmalloc.ccfegetopt.c fegetopt.h utils.cc utils.h166 Singulard_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc utils.h 167 167 168 168 Singulard_LDADD = libSingular.la ${BUILTIN_FLAGS} -
Singular/attrib.h
r540609 rdc50ee 9 9 #include <string.h> 10 10 #include <kernel/structs.h> 11 #include <omalloc/omallocClass.h> 11 12 12 13 class sattr; 13 14 typedef sattr * attr; 14 class sattr 15 class sattr: public omallocClass 15 16 { 16 17 public: -
factory/canonicalform.h
r540609 rdc50ee 33 33 #include <factory/templates/ftmpl_factor.h> 34 34 #include <factory/templates/ftmpl_matrix.h> 35 #ifdef HAVE_OMALLOC 36 #include <omalloc/omallocClass.h> 37 #endif 35 38 36 39 /*BEGINPUBLIC*/ … … 71 74 **/ 72 75 class CanonicalForm 76 #ifdef HAVE_OMALLOC 77 : public omallocClass 78 #endif 73 79 { 74 80 private: -
factory/factory.template
r540609 rdc50ee 25 25 #include <factory/factoryconf.h> 26 26 #include <stdint.h> 27 #ifdef HAVE_OMALLOC 28 #include <omalloc/omallocClass.h> 29 #endif 27 30 28 31 #ifndef NOSTREAMIO -
kernel/GBEngine/kutil.h
r540609 rdc50ee 12 12 13 13 #include <omalloc/omalloc.h> 14 #include <omalloc/omallocClass.h> 14 15 #include <misc/mylimits.h> 15 16 … … 271 272 class skStrategy; 272 273 typedef skStrategy * kStrategy; 273 class skStrategy 274 class skStrategy : public omallocClass 274 275 { 275 276 public: -
omalloc/Makefile.am
r540609 rdc50ee 16 16 17 17 noinst_HEADERS= omPage.h omDefaultConfig.h omReturn.h omGetPageSize.h \ 18 omMalloc.h omMallocSystem.h 18 omMalloc.h omMallocSystem.h omallocClass.h 19 19 20 20 SOURCES=\ … … 23 23 omAllocSystem.c omError.c omStats.c omRet2Info.c \ 24 24 omBin.c omDebugTrack.c \ 25 omalloc_provide.c omAllocFunc.c 25 omalloc_provide.c omAllocFunc.c omallocClass.cc 26 26 27 27 EXTRA_DIST = omalloc.c omtTestAlloc.c omtTest.h omMmap.c -
omalloc/configure.ac
r540609 rdc50ee 12 12 AC_CONFIG_SRCDIR(om_Alloc.c) 13 13 AC_CONFIG_HEADER([_config.h]) 14 15 AC_PROG_CC 16 AC_PROG_CXX 14 17 15 18 SING_RESET_FLAGS() -
omalloc/omallocClass.cc
r540609 rdc50ee 5 5 * ABSTRACT: standard version of C++-memory management alloc func 6 6 */ 7 #include <kernel/mod2.h>8 7 9 8 #include <omalloc/omalloc.h> 10 9 10 #ifdef __cplusplus 11 11 12 #include <new> 12 13 #include <stdlib.h> 14 #include <omalloc/omallocClass.h> 13 15 14 16 /* We define those, so that our values of 15 17 OM_TRACK and OM_CHECK are used */ 16 void* o perator new ( size_t size )18 void* omallocClass::operator new ( size_t size ) 17 19 #ifndef __GNUC__ 18 20 throw (std::bad_alloc) … … 25 27 } 26 28 27 void operator delete ( void* block )29 void omallocClass::operator delete ( void* block ) 28 30 #ifndef __GNUC__ 29 31 throw () … … 33 35 } 34 36 35 void* operator new[] ( size_t size )37 void* omallocClass::operator new[] ( size_t size ) 36 38 #ifndef __GNUC__ 37 39 throw (std::bad_alloc) … … 44 46 } 45 47 46 void operator delete[] ( void* block )48 void omallocClass::operator delete[] ( void* block ) 47 49 #ifndef __GNUC__ 48 50 throw () … … 71 73 // long before the exception gets thrown. 72 74 73 void * operator new(size_t size, const std::nothrow_t &) throw()75 void * omallocClass::operator new(size_t size, const std::nothrow_t &) throw() 74 76 { 75 77 void* addr; … … 79 81 } 80 82 81 void * operator new[](size_t size, const std::nothrow_t &) throw()83 void * omallocClass::operator new[](size_t size, const std::nothrow_t &) throw() 82 84 { 83 85 void* addr; … … 86 88 return addr; 87 89 } 90 #endif -
omalloc/omallocClass.h
r540609 rdc50ee 1 #ifndef OMALLOCCLASS_H 2 #define OMALLOCCLASS_H 3 1 4 /**************************************** 2 5 * Computer Algebra System SINGULAR * … … 5 8 * ABSTRACT: standard version of C++-memory management alloc func 6 9 */ 7 #include <kernel/mod2.h>8 10 9 #i nclude <omalloc/omalloc.h>11 #ifdef __cplusplus 10 12 11 13 #include <new> 12 14 #include <stdlib.h> 13 15 16 class omallocClass 17 { 18 public: 14 19 /* We define those, so that our values of 15 20 OM_TRACK and OM_CHECK are used */ … … 18 23 throw (std::bad_alloc) 19 24 #endif 20 { 21 void* addr; 22 if (size==(size_t)0) size = 1; 23 omTypeAlloc(void*, addr, size); 24 return addr; 25 } 26 25 ; 27 26 void operator delete ( void* block ) 28 27 #ifndef __GNUC__ 29 28 throw () 30 29 #endif 31 { 32 omfree( block ); 33 } 30 ; 34 31 35 32 void* operator new[] ( size_t size ) … … 37 34 throw (std::bad_alloc) 38 35 #endif 39 { 40 void* addr; 41 if (size==(size_t)0) size = (size_t)1; 42 omTypeAlloc(void*, addr, size); 43 return addr; 44 } 36 ; 45 37 46 38 void operator delete[] ( void* block ) … … 48 40 throw () 49 41 #endif 50 { 51 omfree( block ); 52 } 42 ; 53 43 54 44 // The C++ standard has ratified a change to the new operator. … … 71 61 // long before the exception gets thrown. 72 62 73 void * operator new(size_t size, const std::nothrow_t &) throw() 74 { 75 void* addr; 76 if (size==(size_t)0) size = (size_t)1; 77 omTypeAlloc(void*, addr, size); 78 return addr; 79 } 63 void * operator new(size_t size, const std::nothrow_t &) throw(); 80 64 81 void * operator new[](size_t size, const std::nothrow_t &) throw() 82 { 83 void* addr; 84 if (size==(size_t)0) size = (size_t)1; 85 omTypeAlloc(void*, addr, size); 86 return addr; 87 } 65 void * operator new[](size_t size, const std::nothrow_t &) throw(); 66 }; 67 #endif 68 #endif
Note: See TracChangeset
for help on using the changeset viewer.