Changeset e03d7b in git
- Timestamp:
- Apr 10, 2015, 2:26:57 PM (8 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- aeb760bbbad0ff816c36fdb5a66d5481d76a769c
- Parents:
- 76f52597f7be2cdc6a83d6956f788e3bb342a2f9
- Location:
- omalloc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
omalloc/omallocClass.cc
r76f525 re03d7b 13 13 #include <stdlib.h> 14 14 #include <omalloc/omallocClass.h> 15 16 /* We define those, so that our values of17 OM_TRACK and OM_CHECK are used */18 void* omallocClass::operator new ( size_t size )19 #ifndef __GNUC__20 throw (std::bad_alloc)21 #endif22 {23 void* addr;24 if (size==(size_t)0) size = 1;25 omTypeAlloc(void*, addr, size);26 return addr;27 }28 29 void omallocClass::operator delete ( void* block )30 #ifndef __GNUC__31 throw ()32 #endif33 {34 omfree( block );35 }36 15 37 16 void* omallocClass::operator new[] ( size_t size ) … … 76 55 { 77 56 void* addr; 78 if (size==(size_t)0) size = (size_t)1;79 57 omTypeAlloc(void*, addr, size); 80 58 return addr; -
omalloc/omallocClass.h
r76f525 re03d7b 13 13 #include <new> 14 14 #include <stdlib.h> 15 #include <omalloc/omalloc.h> 15 16 16 17 class omallocClass … … 23 24 throw (std::bad_alloc) 24 25 #endif 25 ; 26 { 27 void* addr; 28 omTypeAlloc(void*, addr, size); 29 return addr; 30 } 31 26 32 void operator delete ( void* block ) 27 33 #ifndef __GNUC__ 28 34 throw () 29 35 #endif 30 ; 36 { 37 omFree( block ); 38 } 39 31 40 32 41 void* operator new[] ( size_t size )
Note: See TracChangeset
for help on using the changeset viewer.