Changeset 4b24dc8 in git for Singular/mmstd.c
- Timestamp:
- Jan 24, 2001, 5:54:04 PM (23 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 4e69082e0209f82df529824514e15aea87df0b8e
- Parents:
- 743f966818cf48c82bf4229a7c697ff3e1b327d2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/mmstd.c
r743f96 r4b24dc8 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: mmstd.c,v 1. 1 2000-11-20 10:18:56 hannesExp $ */4 /* $Id: mmstd.c,v 1.2 2001-01-24 16:54:04 levandov Exp $ */ 5 5 /* 6 6 * ABSTRACT: standard version of C-memory management alloc func … … 14 14 // define this so that all addr allocated there are marked 15 15 // as static, i.e. not metioned by omPrintUsedAddr 16 #ifndef ix86_Win 16 17 #define OM_MALLOC_MARK_AS_STATIC 17 18 #include <omalloc.c> 19 #else 20 #include <stdlib.h> 21 void freeSize(void* addr, size_t size) 22 { 23 if (addr) free(addr); 24 } 25 26 void* reallocSize(void* old_addr, size_t old_size, size_t new_size) 27 { 28 if (old_addr && new_size) 29 { 30 return realloc(old_addr, new_size); 31 } 32 else 33 { 34 freeSize(old_addr, old_size); 35 return malloc(new_size); 36 } 37 } 38 #endif
Note: See TracChangeset
for help on using the changeset viewer.