Changeset fea494 in git for xalloc/omalloc.h
- Timestamp:
- Sep 24, 2014, 1:05:36 PM (10 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b9f50b373314e74e83c7c060a651dd2913e1f033')
- Children:
- 65a40710c408315804772d0a7ff078203be9d9bf
- Parents:
- 46f37cb57098799d8399fc704c5b3ca2020ca0c1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
xalloc/omalloc.h
r46f37cb rfea494 76 76 static inline void *omRealloc(void *d, size_t ns) 77 77 { if (d==NULL) return omAlloc(ns); 78 else 78 else 79 79 { 80 long *dd=(long*)d; dd--; dd=(long*)realloc(dd,ns+sizeof(long)); 80 long *dd=(long*)d; dd--; dd=(long*)realloc(dd,ns+sizeof(long)); 81 81 *dd=ns+sizeof(long);dd++; return dd; 82 82 } … … 84 84 static inline void *omReallocSize(void *d, size_t os, size_t ns) 85 85 { if (d==NULL) return omAlloc(ns); 86 else 86 else 87 87 { 88 long *dd=(long*)d; dd--; dd=(long*)realloc(dd,ns+sizeof(long)); 88 long *dd=(long*)d; dd--; dd=(long*)realloc(dd,ns+sizeof(long)); 89 89 *dd=ns+sizeof(long);dd++; return dd; 90 90 } … … 161 161 }; 162 162 // typedef enum omError_e omError_t; 163 163 164 164 #define omSizeWOfAddr(P) (omSizeOfAddr(P)/sizeof(long)) 165 165 166 166 #define omTypeAllocBin(T,P,B) P=(T)omAlloc(B) 167 167 #define omTypeAlloc(T,P,S) P=(T)omAlloc(S) … … 173 173 #define omAllocBin0(B) omAlloc0(B) 174 174 #define omAlloc0Bin(B) omAlloc0(B) 175 #define omInitInfo() 175 #define omInitInfo() 176 176 #define omInitGetBackTrace() 177 #define omUpdateInfo() 177 #define omUpdateInfo() 178 178 #define omPrintStats(F) 179 179 #define omPrintInfo(F)
Note: See TracChangeset
for help on using the changeset viewer.